capi: Added wrapper 42/239742/1
authorMateusz Palkowski <m.palkowski@samsung.com>
Wed, 29 Jul 2020 10:23:18 +0000 (12:23 +0200)
committerMateusz Palkowski <m.palkowski@samsung.com>
Wed, 29 Jul 2020 10:23:18 +0000 (12:23 +0200)
for tvg::Shape::transform (fixed)

Change-Id: Ibbb867e828a07af90f38ed506894d026004fa53d

inc/thorvg_capi.h
src/bindings/capi/tvgCapi.cpp

index efb135b..96724dc 100644 (file)
@@ -143,6 +143,7 @@ TVG_EXPORT Tvg_Result tvg_shape_fill_color(Tvg_Paint* paint, uint8_t r, uint8_t
 TVG_EXPORT Tvg_Result tvg_shape_scale(Tvg_Paint* paint, float factor);
 TVG_EXPORT Tvg_Result tvg_shape_rotate(Tvg_Paint* paint, float degree);
 TVG_EXPORT Tvg_Result tvg_shape_translate(Tvg_Paint* paint, float x, float y);
+TVG_EXPORT Tvg_Result tvg_shape_transform(Tvg_Paint* paint, const Tvg_Matrix* m);
 
 #ifdef __cplusplus
 }
index 5c6fd59..1972bd0 100644 (file)
@@ -241,6 +241,11 @@ TVG_EXPORT Tvg_Result tvg_shape_translate(Tvg_Paint* paint, float x, float y)
     return (Tvg_Result) reinterpret_cast<Shape*>(paint)->translate(x, y);
 }
 
+TVG_EXPORT Tvg_Result tvg_shape_transform(Tvg_Paint* paint, const Tvg_Matrix* m)
+{
+    return (Tvg_Result) reinterpret_cast<Shape*>(paint)->transform(*(reinterpret_cast<const Matrix*>(m)));
+}
+
 #ifdef __cplusplus
 }
 #endif
\ No newline at end of file