aboutsummaryrefslogtreecommitdiff
path: root/common/rect.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/rect.h')
-rw-r--r--common/rect.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/rect.h b/common/rect.h
index 01a0a0d431..962069bf48 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -187,6 +187,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);
}