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

Unified Diff: ui/gfx/canvas.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: RenderText fixup 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: ui/gfx/canvas.cc
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index 936af4b7349c3f375a2b3ac365320eb9b23d4e37..bf41bc1357effecc63f8a7187d68ffc1d2149a75 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -190,8 +190,8 @@ bool Canvas::GetClipBounds(gfx::Rect* bounds) {
return has_non_empty_clip;
}
-void Canvas::Translate(const gfx::Point& point) {
- canvas_->translate(SkIntToScalar(point.x()), SkIntToScalar(point.y()));
+void Canvas::Translate(const gfx::Vector2d& offset) {
+ canvas_->translate(SkIntToScalar(offset.x()), SkIntToScalar(offset.y()));
}
void Canvas::Scale(int x_scale, int y_scale) {

Powered by Google App Engine
This is Rietveld 408576698