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

Unified Diff: src/c/sk_surface.cpp

Issue 762493005: Add scale and skew to C canvas API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Now with radians Created 6 years 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 | « include/c/sk_canvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/c/sk_surface.cpp
diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp
index 1cd4f3d87e37c84de4753cfb722c53f314c0baff..c75ab23d55728f67ee0b348ba70bac82a3d24c65 100644
--- a/src/c/sk_surface.cpp
+++ b/src/c/sk_surface.cpp
@@ -308,6 +308,18 @@ void sk_canvas_scale(sk_canvas_t* ccanvas, float sx, float sy) {
AsCanvas(ccanvas)->scale(sx, sy);
}
+void sk_canvas_rotate_degress(sk_canvas_t* ccanvas, float degrees) {
+ AsCanvas(ccanvas)->rotate(degrees);
+}
+
+void sk_canvas_rotate_radians(sk_canvas_t* ccanvas, float radians) {
+ AsCanvas(ccanvas)->rotate(SkRadiansToDegrees(radians));
+}
+
+void sk_canvas_skew(sk_canvas_t* ccanvas, float sx, float sy) {
+ AsCanvas(ccanvas)->skew(sx, sy);
+}
+
void sk_canvas_draw_paint(sk_canvas_t* ccanvas, const sk_paint_t* cpaint) {
AsCanvas(ccanvas)->drawPaint(AsPaint(*cpaint));
}
« no previous file with comments | « include/c/sk_canvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698