diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/gfx/rect.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/gfx/rect.h b/base/gfx/rect.h index 2f1a498..963470a 100644 --- a/base/gfx/rect.h +++ b/base/gfx/rect.h @@ -91,6 +91,11 @@ class Rect { // point (x + width, y + height) is not. bool Contains(int point_x, int point_y) const; + // Returns true if the specified point is contained by this rectangle. + bool Contains(const gfx::Point& point) const { + return Contains(point.x(), point.y()); + } + // Returns true if this rectangle contains the specified rectangle. bool Contains(const Rect& rect) const; |