vg common: Removed thorVG dependency. 15/257915/3
authorMichal Szczecinski <m.szczecinsk@partner.samsung.com>
Thu, 6 May 2021 09:19:46 +0000 (11:19 +0200)
committerHermet Park <chuneon.park@samsung.com>
Fri, 7 May 2021 02:58:13 +0000 (02:58 +0000)
ThorVG library now supports path_bounds_get API. This commit uses it in
gradient property calculation.

Change-Id: I87beda0eb1cbb761d0a0d48f752e7e5b95f41588

src/static_libs/vg_common/vg_common_svg.c

index a38230b..c564b35 100644 (file)
@@ -563,8 +563,6 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F
 
    //TODO: apply actual sizes (imporve bounds_get function?)...
    //for example with figures and paths
-
-#ifndef HAVE_THORVG
    if (!g->user_space)
      efl_gfx_path_bounds_get(vg, &r);
    else
@@ -572,13 +570,6 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F
         r.w = vg_data->view_box.w;
         r.h = vg_data->view_box.h;
      }
-#else
-   //TODO: in thorvg mode we are not able to use efl_gfx_api, and evas
-   //module don't provide nothing similar. Probably we have to get
-   //path here and calcluate path bounds internally
-   r.w = vg_data->view_box.w;
-   r.h = vg_data->view_box.h;
-#endif
 
    if (g->type == SVG_LINEAR_GRADIENT)
      {