From 1bf64890e53e6c85d3402f3f252fd6118c33ff28 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 25 Jul 2008 09:16:33 +0000 Subject: Added Common::Rect::isEmpty() method svn-id: r33279 --- common/rect.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/rect.h b/common/rect.h index f71124434a..dcf1c8b421 100644 --- a/common/rect.h +++ b/common/rect.h @@ -177,6 +177,10 @@ struct Rect { clip(Rect(0, 0, maxw, maxh)); } + bool isEmpty() const { + return (left >= right || top >= bottom); + } + bool isValidRect() const { return (left <= right && top <= bottom); } -- cgit v1.2.3