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

Unified Diff: ui/gfx/size_f.h

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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_conversions.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/size_f.h
diff --git a/ui/gfx/size_f.h b/ui/gfx/size_f.h
index c377395c57d48d77a1a384db3c807a9eebd767db..f3ad7dbed9904aebb1aa9a1b52bba16623ef19ad 100644
--- a/ui/gfx/size_f.h
+++ b/ui/gfx/size_f.h
@@ -19,6 +19,14 @@ class UI_EXPORT SizeF : public SizeBase<SizeF, float> {
SizeF(float width, float height);
~SizeF();
+ SizeF Scale(float scale) const WARN_UNUSED_RESULT {
+ return Scale(scale, scale);
+ }
+
+ SizeF Scale(float x_scale, float y_scale) const WARN_UNUSED_RESULT {
+ return SizeF(width() * x_scale, height() * y_scale);
+ }
+
std::string ToString() const;
};
« no previous file with comments | « ui/gfx/size_conversions.cc ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698