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

Unified Diff: ui/gfx/point_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/point_conversions.cc ('k') | ui/gfx/shadow_value.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/point_f.h
diff --git a/ui/gfx/point_f.h b/ui/gfx/point_f.h
index ff1c4dfdff0912077ea580070c0ffcc53b191964..a0b367f9789ea165b4efd8873720c3223e96d6ca 100644
--- a/ui/gfx/point_f.h
+++ b/ui/gfx/point_f.h
@@ -19,6 +19,14 @@ class UI_EXPORT PointF : public PointBase<PointF, float> {
PointF(float x, float y);
~PointF();
+ PointF Scale(float scale) const WARN_UNUSED_RESULT {
+ return Scale(scale, scale);
+ }
+
+ PointF Scale(float x_scale, float y_scale) const WARN_UNUSED_RESULT {
+ return PointF(x() * x_scale, y() * y_scale);
+ }
+
// Returns a string representation of point.
std::string ToString() const;
};
« no previous file with comments | « ui/gfx/point_conversions.cc ('k') | ui/gfx/shadow_value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698