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

Unified Diff: ui/gfx/point_f.cc

Issue 11369144: ui: Make gfx::Point::Scale() mutate the class, similar to gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for aura 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
Index: ui/gfx/point_f.cc
diff --git a/ui/gfx/point_f.cc b/ui/gfx/point_f.cc
index d22693a0294af9bc937d1b2c6036804f1822e578..ea683030e528527b51ecec92a37826c90f7d6d44 100644
--- a/ui/gfx/point_f.cc
+++ b/ui/gfx/point_f.cc
@@ -22,4 +22,11 @@ std::string PointF::ToString() const {
return base::StringPrintf("%f,%f", x(), y());
}
+PointF ScalePoint(const PointF& p, float x_scale, float y_scale) {
+ PointF scaled_p(p);
+ scaled_p.Scale(x_scale, y_scale);
+ return scaled_p;
+}
+
+
} // namespace gfx
« cc/layer_impl.cc ('K') | « ui/gfx/point_f.h ('k') | ui/gfx/point_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698