Index: ui/gfx/rect_f.h |
diff --git a/ui/gfx/rect_f.h b/ui/gfx/rect_f.h |
index 78524a07587d609c0c0bc3b9f9c851a23ab4df69..62bedf2e3593d40c3a7cc008d6021a651462f17d 100644 |
--- a/ui/gfx/rect_f.h |
+++ b/ui/gfx/rect_f.h |
@@ -69,8 +69,15 @@ inline bool operator!=(const RectF& lhs, const RectF& rhs) { |
return !(lhs == rhs); |
} |
-UI_EXPORT RectF operator+(const RectF& lhs, const Vector2dF& rhs); |
-UI_EXPORT RectF operator-(const RectF& lhs, const Vector2dF& rhs); |
+inline RectF operator+(const RectF& lhs, const Vector2dF& rhs) { |
+ return RectF(lhs.x() + rhs.x(), lhs.y() + rhs.y(), |
+ lhs.width(), lhs.height()); |
+} |
+ |
+inline RectF operator-(const RectF& lhs, const Vector2dF& rhs) { |
+ return RectF(lhs.x() - rhs.x(), lhs.y() - rhs.y(), |
+ lhs.width(), lhs.height()); |
+} |
inline RectF operator+(const Vector2dF& lhs, const RectF& rhs) { |
return rhs + lhs; |
@@ -79,7 +86,11 @@ inline RectF operator+(const Vector2dF& lhs, const RectF& rhs) { |
UI_EXPORT RectF IntersectRects(const RectF& a, const RectF& b); |
UI_EXPORT RectF UnionRects(const RectF& a, const RectF& b); |
UI_EXPORT RectF SubtractRects(const RectF& a, const RectF& b); |
-UI_EXPORT RectF ScaleRect(const RectF& r, float x_scale, float y_scale); |
+ |
+inline RectF ScaleRect(const RectF& r, float x_scale, float y_scale) { |
+ return RectF(r.x() * x_scale, r.y() * y_scale, |
+ r.width() * x_scale, r.height() * y_scale); |
+} |
inline RectF ScaleRect(const RectF& r, float scale) { |
return ScaleRect(r, scale, scale); |