aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Platform.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h
index 4bba252f2..c4a1a0b40 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -144,6 +144,11 @@ public:
return (pt.x >= left) && (pt.x <= right) &&
(pt.y >= top) && (pt.y <= bottom);
}
+ bool ContainsWholePixel(Point pt) const {
+ // Does the rectangle contain all of the pixel to left/below the point
+ return (pt.x >= left) && ((pt.x+1) <= right) &&
+ (pt.y >= top) && ((pt.y+1) <= bottom);
+ }
bool Contains(PRectangle rc) const {
return (rc.left >= left) && (rc.right <= right) &&
(rc.top >= top) && (rc.bottom <= bottom);