summaryrefslogtreecommitdiffstats
path: root/ui/gfx/rect.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/rect.h')
-rw-r--r--ui/gfx/rect.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h
index 5479d2e..076f9fc 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -77,6 +77,13 @@ inline bool operator!=(const Rect& lhs, const Rect& rhs) {
return !(lhs == rhs);
}
+UI_EXPORT Rect operator+(const Rect& lhs, const Vector2d& rhs);
+UI_EXPORT Rect operator-(const Rect& lhs, const Vector2d& rhs);
+
+inline Rect operator+(const Vector2d& lhs, const Rect& rhs) {
+ return rhs + lhs;
+}
+
UI_EXPORT Rect IntersectRects(const Rect& a, const Rect& b);
UI_EXPORT Rect UnionRects(const Rect& a, const Rect& b);
UI_EXPORT Rect SubtractRects(const Rect& a, const Rect& b);