summaryrefslogtreecommitdiffstats
path: root/ui/gfx/rect_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/rect_base.h')
-rw-r--r--ui/gfx/rect_base.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gfx/rect_base.h b/ui/gfx/rect_base.h
index f1a2863..30fc1f1 100644
--- a/ui/gfx/rect_base.h
+++ b/ui/gfx/rect_base.h
@@ -143,6 +143,10 @@ class UI_EXPORT RectBase {
// same height) with the given rectangle, and the rectangles do not overlap.
bool SharesEdgeWith(const Class& rect) const;
+ // Returns the manhattan distance from the rect to the point. If the point is
+ // inside the rect, returns 0.
+ Type ManhattanDistanceToPoint(const PointClass& point) const;
+
protected:
RectBase(const PointClass& origin, const SizeClass& size)
: origin_(origin), size_(size) {}