SK_API void sk_canvas_draw_text_on_path (sk_canvas_t*, const char *text, size_t byteLength, const sk_path_t*path, float hOffset, float vOffset, const sk_paint_t* paint);
-SK_API void sk_canvas_draw_bitmap(sk_canvas_t* ccanvas, const sk_bitmap_t& cbitmap, float x, float y, const sk_paint_t* cpaint);
+SK_API void sk_canvas_draw_bitmap(sk_canvas_t* ccanvas, const sk_bitmap_t* cbitmap, float x, float y, const sk_paint_t* cpaint);
-SK_API void sk_canvas_draw_bitmap_rect(sk_canvas_t* ccanvas, const sk_bitmap_t& cbitmap, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_paint_t* cpaint);
+SK_API void sk_canvas_draw_bitmap_rect(sk_canvas_t* ccanvas, const sk_bitmap_t* cbitmap, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_paint_t* cpaint);
SK_C_PLUS_PLUS_END_GUARD
@param tmx The tiling mode to use when sampling the bitmap in the x-direction.
@param tmy The tiling mode to use when sampling the bitmap in the y-direction.
*/
-SK_API sk_shader_t* sk_shader_new_bitmap(const sk_bitmap_t& src,
+SK_API sk_shader_t* sk_shader_new_bitmap(const sk_bitmap_t* src,
sk_shader_tilemode_t tmx,
sk_shader_tilemode_t tmy,
const sk_matrix_t* localMatrix);
AsCanvas(ccanvas)->drawTextOnPathHV(text, byteLength, AsPath(*path), hOffset, vOffset, *AsPaint(cpaint));
}
-void sk_canvas_draw_bitmap(sk_canvas_t* ccanvas, const sk_bitmap_t& cbitmap, float x, float y, const sk_paint_t* cpaint)
+void sk_canvas_draw_bitmap(sk_canvas_t* ccanvas, const sk_bitmap_t* cbitmap, float x, float y, const sk_paint_t* cpaint)
{
- AsCanvas(ccanvas)->drawBitmap(AsBitmap(cbitmap), x, y, AsPaint(cpaint));
+ AsCanvas(ccanvas)->drawBitmap(*AsBitmap(cbitmap), x, y, AsPaint(cpaint));
}
-void sk_canvas_draw_bitmap_rect(sk_canvas_t* ccanvas, const sk_bitmap_t& cbitmap, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_paint_t* cpaint)
+void sk_canvas_draw_bitmap_rect(sk_canvas_t* ccanvas, const sk_bitmap_t* cbitmap, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_paint_t* cpaint)
{
SkCanvas* canvas = AsCanvas(ccanvas);
- const SkBitmap& bitmap = AsBitmap(cbitmap);
+ const SkBitmap& bitmap = *AsBitmap(cbitmap);
const SkRect& dst = AsRect(*cdstR);
const SkPaint* paint = AsPaint(cpaint);
return (sk_shader_t*) SkShader::CreateColorShader(color);
}
-sk_shader_t* sk_shader_new_bitmap(const sk_bitmap_t& src,
+sk_shader_t* sk_shader_new_bitmap(const sk_bitmap_t* src,
sk_shader_tilemode_t tmx,
sk_shader_tilemode_t tmy,
const sk_matrix_t* localMatrix) {
} else {
matrix.setIdentity();
}
- SkShader* s = SkShader::CreateBitmapShader(AsBitmap(src), modex, modey, &matrix);
+ SkShader* s = SkShader::CreateBitmapShader(*AsBitmap(src), modex, modey, &matrix);
return (sk_shader_t*)s;
}