capi: Added wrapper

for tvg::Shape::transform (fixed)

Change-Id: Ibbb867e828a07af90f38ed506894d026004fa53d
This commit is contained in:
Mateusz Palkowski 2020-07-29 12:23:18 +02:00
parent 9e0c4666af
commit cd699738b6
2 changed files with 6 additions and 0 deletions

View 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
}

View 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