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

Unified Diff: src/core/SkCanvas.cpp

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
« no previous file with comments | « samplecode/SampleHT.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 0ce97fff20661f8e2c82aacb801d2bb1cf574718..3067772c8ad87db06b7ac588f14c61afd141239a 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1498,6 +1498,12 @@ void SkCanvas::rotate(SkScalar degrees) {
this->concat(m);
}
+void SkCanvas::rotate(SkScalar degrees, SkScalar px, SkScalar py) {
reed1 2016/07/12 17:28:59 possibly check for 0 == degrees to skip the rest.
bungeman-skia 2016/07/12 17:37:42 If so, I think it would need to be done above as w
+ SkMatrix m;
+ m.setRotate(degrees, px, py);
+ this->concat(m);
+}
+
void SkCanvas::skew(SkScalar sx, SkScalar sy) {
SkMatrix m;
m.setSkew(sx, sy);
« no previous file with comments | « samplecode/SampleHT.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698