Index: ui/gfx/rect_f.h |
diff --git a/ui/gfx/rect_f.h b/ui/gfx/rect_f.h |
index 4a2d642fb817d5807bec32d7941a40bc600ef874..613352555d6fd53f0a4b5932d263384066914b5a 100644 |
--- a/ui/gfx/rect_f.h |
+++ b/ui/gfx/rect_f.h |
@@ -8,7 +8,6 @@ |
#include <string> |
#include "ui/gfx/point_f.h" |
-#include "ui/gfx/rect.h" |
#include "ui/gfx/rect_base.h" |
#include "ui/gfx/size_f.h" |
@@ -27,7 +26,15 @@ class UI_EXPORT RectF : public RectBase<RectF, PointF, SizeF, InsetsF, float> { |
~RectF(); |
- Rect ToRect() const; |
+ /// Scales the rectangle by |scale|. |
+ RectF Scale(float scale) const WARN_UNUSED_RESULT { |
+ return Scale(scale, scale); |
+ } |
+ |
+ RectF Scale(float x_scale, float y_scale) const WARN_UNUSED_RESULT { |
+ return RectF(origin().Scale(x_scale, y_scale), |
+ size().Scale(x_scale, y_scale)); |
+ } |
std::string ToString() const; |
}; |
@@ -38,4 +45,4 @@ extern template class RectBase<RectF, PointF, SizeF, InsetsF, float>; |
} // namespace gfx |
-#endif // UI_GFX_RECT_H_ |
+#endif // UI_GFX_RECT_F_H_ |