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

Unified Diff: gm/imagefilterstransformed.cpp

Issue 2142033002: Factor code to rotate a canvas about a point. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « gm/fontscalerdistortable.cpp ('k') | gm/strokes.cpp » ('j') | gm/strokes.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefilterstransformed.cpp
diff --git a/gm/imagefilterstransformed.cpp b/gm/imagefilterstransformed.cpp
index 7ceff001351e1cba1944c72313d2d2b2b953c7cb..af1d16bd3b2a6c412e983cd0128c02625ed8b254 100644
--- a/gm/imagefilterstransformed.cpp
+++ b/gm/imagefilterstransformed.cpp
@@ -140,18 +140,14 @@ DEF_SIMPLE_GM(rotate_imagefilter, canvas, 500, 500) {
canvas->translate(150, 0);
canvas->save();
- canvas->translate(100, 100);
- canvas->rotate(30);
- canvas->translate(-100, -100);
+ sk_tool_utils::rotate_about(canvas, 30, 100, 100);
canvas->drawRect(r, paint);
canvas->restore();
paint.setAntiAlias(true);
canvas->translate(150, 0);
canvas->save();
- canvas->translate(100, 100);
- canvas->rotate(30);
- canvas->translate(-100, -100);
+ sk_tool_utils::rotate_about(canvas, 30, 100, 100);
canvas->drawRect(r, paint);
canvas->restore();
« no previous file with comments | « gm/fontscalerdistortable.cpp ('k') | gm/strokes.cpp » ('j') | gm/strokes.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698