Index: ui/gfx/rect_f.h |
diff --git a/ui/gfx/rect_f.h b/ui/gfx/rect_f.h |
index 4ee1098bf9c14bc3e3196567170f45e6bbd97ad1..c527a7b0a2235e316f9911deea455683d9ad0d85 100644 |
--- a/ui/gfx/rect_f.h |
+++ b/ui/gfx/rect_f.h |
@@ -49,6 +49,34 @@ inline bool operator!=(const RectF& lhs, const RectF& rhs) { |
return !(lhs == rhs); |
} |
+inline RectF Intersection(const RectF& a, const RectF& b) { |
+ RectF result = a; |
+ result.Intersect(b); |
+ return result; |
+} |
+ |
+inline RectF Union(const RectF& a, const RectF& b) { |
+ RectF result = a; |
+ result.Union(b); |
+ return result; |
+} |
+ |
+inline RectF Subtraction(const RectF& a, const RectF& b) { |
+ RectF result = a; |
+ result.Subtract(b); |
+ return result; |
+} |
+ |
+inline RectF Scale(const RectF& r, float x_scale, float y_scale) { |
+ RectF result = r; |
+ result.Scale(x_scale, y_scale); |
+ return result; |
+} |
+ |
+inline RectF Scale(const RectF& r, float scale) { |
+ return Scale(r, scale, scale); |
+} |
+ |
#if !defined(COMPILER_MSVC) |
extern template class RectBase<RectF, PointF, SizeF, InsetsF, float>; |
#endif |