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

Unified Diff: include/core/SkCanvas.h

Issue 2142033002: Factor code to rotate a canvas about a point. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move to canvas. 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
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 26458696bc4d81a4b1a9b304aa847616e93c011a..97aa3c7d8e343e06a1464615fb6edc788afc8148 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -419,11 +419,18 @@ public:
*/
void scale(SkScalar sx, SkScalar sy);
- /** Preconcat the current matrix with the specified rotation.
+ /** Preconcat the current matrix with the specified rotation about the origin.
@param degrees The amount to rotate, in degrees
*/
void rotate(SkScalar degrees);
+ /** Preconcat the current matrix with the specified rotation about a given point.
+ @param degrees The amount to rotate, in degrees
+ @param px The x coordinate of the point to rotate about.
+ @param py The y coordinate of the point to rotate about.
+ */
+ void rotate(SkScalar degrees, SkScalar px, SkScalar py);
+
/** Preconcat the current matrix with the specified skew.
@param sx The amount to skew in X
@param sy The amount to skew in Y
« no previous file with comments | « gm/typeface.cpp ('k') | samplecode/SampleApp.cpp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698