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

Unified Diff: ui/gfx/size_f.cc

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/size_f.h ('k') | webkit/glue/webcursor_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/size_f.cc
diff --git a/ui/gfx/size_f.cc b/ui/gfx/size_f.cc
index 96c186788e4ad23092b8078aff415270e74bc8c7..03c34ec75ff735d2429983a90f31f0265fb05b83 100644
--- a/ui/gfx/size_f.cc
+++ b/ui/gfx/size_f.cc
@@ -24,4 +24,10 @@ std::string SizeF::ToString() const {
return base::StringPrintf("%fx%f", width(), height());
}
+SizeF ScaleSize(const SizeF& s, float x_scale, float y_scale) {
+ SizeF scaled_s(s);
+ scaled_s.Scale(x_scale, y_scale);
+ return scaled_s;
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/size_f.h ('k') | webkit/glue/webcursor_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698