From: Mira Grudzinska Date: Tue, 26 Oct 2021 09:11:56 +0000 (+0200) Subject: capi: tvg_paint_transform -> tvg_paint_set_transform X-Git-Tag: accepted/tizen/unified/20211102.024808~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e649f684b8dcd7aefac6b212356284cb5261908b;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git capi: tvg_paint_transform -> tvg_paint_set_transform --- diff --git a/src/bindings/capi/thorvg_capi.h b/src/bindings/capi/thorvg_capi.h index b6c7ab4..b9f2667 100644 --- a/src/bindings/capi/thorvg_capi.h +++ b/src/bindings/capi/thorvg_capi.h @@ -780,7 +780,7 @@ TVG_EXPORT Tvg_Result tvg_paint_translate(Tvg_Paint* paint, float x, float y); * \retval TVG_RESULT_INVALID_ARGUMENT A @c nullptr is passed as the argument. * \retval TVG_RESULT_FAILED_ALLOCATION An internal error with memory allocation. */ -TVG_EXPORT Tvg_Result tvg_paint_transform(Tvg_Paint* paint, const Tvg_Matrix* m); +TVG_EXPORT Tvg_Result tvg_paint_set_transform(Tvg_Paint* paint, const Tvg_Matrix* m); /*! diff --git a/src/bindings/capi/tvgCapi.cpp b/src/bindings/capi/tvgCapi.cpp index 860472a..7c2fd12 100644 --- a/src/bindings/capi/tvgCapi.cpp +++ b/src/bindings/capi/tvgCapi.cpp @@ -162,7 +162,7 @@ TVG_EXPORT Tvg_Result tvg_paint_translate(Tvg_Paint* paint, float x, float y) } -TVG_EXPORT Tvg_Result tvg_paint_transform(Tvg_Paint* paint, const Tvg_Matrix* m) +TVG_EXPORT Tvg_Result tvg_paint_set_transform(Tvg_Paint* paint, const Tvg_Matrix* m) { if (!paint || !m) return TVG_RESULT_INVALID_ARGUMENT; return (Tvg_Result) reinterpret_cast(paint)->transform(*(reinterpret_cast(m))); diff --git a/src/examples/Capi.cpp b/src/examples/Capi.cpp index 946dc8f..67649b1 100644 --- a/src/examples/Capi.cpp +++ b/src/examples/Capi.cpp @@ -191,7 +191,7 @@ void testCapi() tvg_picture_get_size(pict, &w, &h); tvg_picture_set_size(pict, w/2, h/2); Tvg_Matrix m = {0.8f, 0.0f, 400.0f, 0.0f, 0.8f, 400.0f, 0.0f, 0.0f, 1.0f}; - tvg_paint_transform(pict, &m); + tvg_paint_set_transform(pict, &m); // Set a composite shape Tvg_Paint* comp = tvg_shape_new(); diff --git a/test/capi/capiPaint.cpp b/test/capi/capiPaint.cpp index 383e045..d8feff2 100644 --- a/test/capi/capiPaint.cpp +++ b/test/capi/capiPaint.cpp @@ -31,7 +31,7 @@ TEST_CASE("Paint Transform", "[capiPaint]") Tvg_Matrix matrix_set = {1, 0, 0, 0, 1, 0, 0, 0, 1}, matrix_get; - REQUIRE(tvg_paint_transform(paint, &matrix_set) == TVG_RESULT_SUCCESS); + REQUIRE(tvg_paint_set_transform(paint, &matrix_set) == TVG_RESULT_SUCCESS); REQUIRE(tvg_paint_get_transform(paint, &matrix_get) == TVG_RESULT_SUCCESS); REQUIRE(matrix_get.e11 == Approx(matrix_set.e11).margin(0.000001)); REQUIRE(matrix_get.e12 == Approx(matrix_set.e12).margin(0.000001));