Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: ui/gfx/rect_f.h

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseTOGO Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/gfx/size.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/rect_f.h
diff --git a/ui/gfx/rect_f.h b/ui/gfx/rect_f.h
index 759509105338d70501a4bafc3989394b4829704b..2bc367c94e33cd232a7e4ec025e31cf1e8a1f9ae 100644
--- a/ui/gfx/rect_f.h
+++ b/ui/gfx/rect_f.h
@@ -28,7 +28,7 @@ class UI_EXPORT RectF
~RectF();
- /// Scales the rectangle by |scale|.
+ // Scales the rectangle by |scale|.
void Scale(float scale) {
Scale(scale, scale);
}
@@ -36,7 +36,7 @@ class UI_EXPORT RectF
void Scale(float x_scale, float y_scale) {
set_origin(ScalePoint(origin(), x_scale, y_scale));
- SizeF new_size = size().Scale(x_scale, y_scale);
+ SizeF new_size = gfx::ScaleSize(size(), x_scale, y_scale);
new_size.ClampToNonNegative();
set_size(new_size);
}
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/gfx/size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698