SK_C_API void sk_canvas_draw_bitmap_lattice(sk_canvas_t* t, const sk_bitmap_t* bitmap, const sk_lattice_t* lattice, const sk_rect_t* dst, const sk_paint_t* paint);
SK_C_API void sk_canvas_draw_image_lattice(sk_canvas_t* t, const sk_image_t* image, const sk_lattice_t* lattice, const sk_rect_t* dst, const sk_paint_t* paint);
+SK_C_API void sk_canvas_draw_vertices(sk_canvas_t* ccanvas, sk_vertex_mode_t vmode, int vertexCount, const sk_point_t* vertices, const sk_point_t* texs, const sk_color_t* colors, sk_blendmode_t mode, const uint16_t* indices, int indexCount, const sk_paint_t* paint);
+
SK_C_PLUS_PLUS_END_GUARD
#endif
typedef struct sk_3dview_t sk_3dview_t;
+typedef enum {
+ TRIANGLES_SK_VERTEX_MODE,
+ TRIANGLE_STRIP_SK_VERTEX_MODE,
+ TRIANGLE_FAN_SK_VERTEX_MODE,
+} sk_vertex_mode_t;
+
SK_C_PLUS_PLUS_END_GUARD
#endif
AsCanvas(ccanvas)->drawImageLattice(AsImage(image), AsLattice(*lattice), AsRect(*dst), AsPaint(paint));
}
+void sk_canvas_draw_vertices(sk_canvas_t* ccanvas, sk_vertex_mode_t vmode, int vertexCount, const sk_point_t* vertices, const sk_point_t* texs, const sk_color_t* colors, sk_blendmode_t mode, const uint16_t* indices, int indexCount, const sk_paint_t* paint) {
+ AsCanvas(ccanvas)->drawVertices((SkCanvas::VertexMode)vmode, vertexCount, AsPoint(vertices), AsPoint(texs), colors, (SkBlendMode)mode, indices, indexCount, AsPaint(*paint));
+}
static_assert ((int)SkMatrix44::TypeMask::kAffine_Mask == (int)AFFINE_SK_MATRIX44_TYPE_MASK, ASSERT_MSG(SkMatrix44::TypeMask, sk_matrix44_type_mask_t));
static_assert ((int)SkMatrix44::TypeMask::kPerspective_Mask == (int)PERSPECTIVE_SK_MATRIX44_TYPE_MASK, ASSERT_MSG(SkMatrix44::TypeMask, sk_matrix44_type_mask_t));
+// sk_vertex_mode_t
+static_assert ((int)SkCanvas::VertexMode::kTriangles_VertexMode == (int)TRIANGLES_SK_VERTEX_MODE, ASSERT_MSG(SkCanvas::VertexMode, sk_vertex_mode_t));
+static_assert ((int)SkCanvas::VertexMode::kTriangleStrip_VertexMode == (int)TRIANGLE_STRIP_SK_VERTEX_MODE, ASSERT_MSG(SkCanvas::VertexMode, sk_vertex_mode_t));
+static_assert ((int)SkCanvas::VertexMode::kTriangleFan_VertexMode == (int)TRIANGLE_FAN_SK_VERTEX_MODE, ASSERT_MSG(SkCanvas::VertexMode, sk_vertex_mode_t));
+
#endif