Index: ui/gfx/rect.cc |
diff --git a/ui/gfx/rect.cc b/ui/gfx/rect.cc |
index b46a9d779c266308fd2243df1bd9c49283ff23da..551e6f66b3cda6260b6a754d22d1f151d5da9eb4 100644 |
--- a/ui/gfx/rect.cc |
+++ b/ui/gfx/rect.cc |
@@ -88,4 +88,22 @@ std::string Rect::ToString() const { |
size().ToString().c_str()); |
} |
+Rect IntersectRects(const Rect& a, const Rect& b) { |
+ Rect result = a; |
+ result.Intersect(b); |
+ return result; |
+} |
+ |
+Rect UnionRects(const Rect& a, const Rect& b) { |
+ Rect result = a; |
+ result.Union(b); |
+ return result; |
+} |
+ |
+Rect SubtractRects(const Rect& a, const Rect& b) { |
+ Rect result = a; |
+ result.Subtract(b); |
+ return result; |
+} |
+ |
} // namespace gfx |