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

Unified Diff: ash/wm/gestures/long_press_affordance_handler.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: consts 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
Index: ash/wm/gestures/long_press_affordance_handler.cc
diff --git a/ash/wm/gestures/long_press_affordance_handler.cc b/ash/wm/gestures/long_press_affordance_handler.cc
index 5c4e09d2cf53ff29f562a235b96bbac7f7bc7bc6..35b4f53af84b855b42110edc2d0ede839fe2da70 100644
--- a/ash/wm/gestures/long_press_affordance_handler.cc
+++ b/ash/wm/gestures/long_press_affordance_handler.cc
@@ -203,9 +203,9 @@ class LongPressAffordanceHandler::LongPressAffordanceView
gfx::Transform scale;
scale.SetScale(current_scale_, current_scale_);
// We want to scale from the center.
- canvas->Translate(gfx::Point(center.x(), center.y()));
+ canvas->Translate(gfx::Vector2d(center.x(), center.y()));
sky 2012/10/26 21:37:50 This too feels cumbersome. If we're saying a dista
Peter Kasting 2012/10/26 21:50:12 Seems like this should be: canvas->Translate(ce
danakj 2012/10/26 21:59:43 Ya certainly, or just have gfx::Vector2d centerOf
Peter Kasting 2012/10/26 22:04:06 The reason I didn't do this is because |center| is
canvas->Transform(scale);
- canvas->Translate(gfx::Point(-center.x(), -center.y()));
+ canvas->Translate(gfx::Vector2d(-center.x(), -center.y()));
// Paint affordance glow
int start_radius = kAffordanceInnerRadius - kAffordanceGlowWidth;

Powered by Google App Engine
This is Rietveld 408576698