From ba17287419a739a3d2f0fb86d5af7ecb323d727e Mon Sep 17 00:00:00 2001 From: Mateusz Palkowski Date: Mon, 27 Jul 2020 14:08:51 +0200 Subject: [PATCH] capi: Added wrapper for tvg::Shape::translate Change-Id: Idcf672926c489148f15c654f85b4d6c3ff8cde80 --- inc/thorvg_capi.h | 1 + src/bindings/capi/tvgCapi.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/inc/thorvg_capi.h b/inc/thorvg_capi.h index 9d32483..efb135b 100644 --- a/inc/thorvg_capi.h +++ b/inc/thorvg_capi.h @@ -142,6 +142,7 @@ TVG_EXPORT Tvg_Result tvg_shape_set_stroke_join(Tvg_Paint* paint, Tvg_Stroke_Joi TVG_EXPORT Tvg_Result tvg_shape_fill_color(Tvg_Paint* paint, uint8_t r, uint8_t g, uint8_t b, uint8_t a); 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); #ifdef __cplusplus } diff --git a/src/bindings/capi/tvgCapi.cpp b/src/bindings/capi/tvgCapi.cpp index bd83ccd..5c6fd59 100644 --- a/src/bindings/capi/tvgCapi.cpp +++ b/src/bindings/capi/tvgCapi.cpp @@ -236,6 +236,11 @@ TVG_EXPORT Tvg_Result tvg_shape_rotate(Tvg_Paint* paint, float degree) return (Tvg_Result) reinterpret_cast(paint)->rotate(degree); } +TVG_EXPORT Tvg_Result tvg_shape_translate(Tvg_Paint* paint, float x, float y) +{ + return (Tvg_Result) reinterpret_cast(paint)->translate(x, y); +} + #ifdef __cplusplus } #endif \ No newline at end of file -- 2.7.4