Add scale and skew to C canvas API
R=reed@chromium.org BUG=skia: Review URL: https://codereview.chromium.org/762493005
This commit is contained in:
parent
9dc24686e7
commit
2fc6ea62ce
@ -21,6 +21,9 @@ void sk_canvas_restore(sk_canvas_t*);
|
||||
|
||||
void sk_canvas_translate(sk_canvas_t*, float dx, float dy);
|
||||
void sk_canvas_scale(sk_canvas_t*, float sx, float sy);
|
||||
void sk_canvas_rotate_degrees(sk_canvas_t*, float degrees);
|
||||
void sk_canvas_rotate_radians(sk_canvas_t*, float radians);
|
||||
void sk_canvas_skew(sk_canvas_t*, float sx, float sy);
|
||||
|
||||
void sk_canvas_draw_paint(sk_canvas_t*, const sk_paint_t*);
|
||||
void sk_canvas_draw_rect(sk_canvas_t*, const sk_rect_t*, const sk_paint_t*);
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user