Chromium Code Reviews| Index: ui/gfx/rect.h |
| diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h |
| index 2eab239d4bc76d948c93b86606622841fe778b39..432d77c2f671e708fdb90a0f734b1b86dd789ab4 100644 |
| --- a/ui/gfx/rect.h |
| +++ b/ui/gfx/rect.h |
| @@ -75,6 +75,24 @@ inline bool operator!=(const Rect& lhs, const Rect& rhs) { |
| return !(lhs == rhs); |
| } |
| +inline Rect Intersection(const Rect& a, const Rect& b) { |
|
sky
2012/10/25 23:31:53
I think we need more descriptive names otherwise w
danakj
2012/10/26 00:16:04
Sure, though I thought the same and enne@ convince
|
| + Rect result = a; |
| + result.Intersect(b); |
| + return result; |
| +} |
| + |
| +inline Rect Union(const Rect& a, const Rect& b) { |
| + Rect result = a; |
| + result.Union(b); |
| + return result; |
| +} |
| + |
| +inline Rect Subtraction(const Rect& a, const Rect& b) { |
| + Rect result = a; |
| + result.Subtract(b); |
| + return result; |
| +} |
| + |
| #if !defined(COMPILER_MSVC) |
| extern template class RectBase<Rect, Point, Size, Insets, int>; |
| #endif |