void sk_canvas_draw_image_rect(sk_canvas_t* ccanvas, const sk_image_t* cimage, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_paint_t* cpaint) { SkCanvas* canvas = AsCanvas(ccanvas); const SkImage* image = AsImage(cimage); const SkRect& dst = AsRect(*cdstR); const SkPaint* paint = AsPaint(cpaint); if (csrcR) { canvas->drawImageRect(image, AsRect(*csrcR), dst, paint); } else { canvas->drawImageRect(image, dst, paint); } }
void sk_canvas_draw_image_rect(sk_canvas_t* ccanvas, const sk_image_t* cimage, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_paint_t* cpaint) { AsCanvas(ccanvas)->drawImageRect(AsImage(cimage), AsRect(csrcR), AsRect(*cdstR), AsPaint(cpaint)); }
void sk_canvas_draw_image(sk_canvas_t* ccanvas, const sk_image_t* cimage, float x, float y, const sk_paint_t* cpaint) { AsCanvas(ccanvas)->drawImage(AsImage(cimage), x, y, AsPaint(cpaint)); }
uint32_t sk_image_get_unique_id(const sk_image_t* cimage) { return AsImage(cimage)->uniqueID(); }
int sk_image_get_height(const sk_image_t* cimage) { return AsImage(cimage)->height(); }
int sk_image_get_width(const sk_image_t* cimage) { return AsImage(cimage)->width(); }
void sk_image_unref(const sk_image_t* cimage) { AsImage(cimage)->unref(); }
sk_data_t* sk_image_encode(const sk_image_t* cimage) { return ToData(AsImage(cimage)->encode()); }