From 962fc9a303cafebd7fc1a1d644d65b3a35b75911 Mon Sep 17 00:00:00 2001 From: Michal Szczecinski Date: Thu, 6 May 2021 12:18:49 +0200 Subject: [PATCH] vg common: Enable fill rule getter. This commit removes ThorVG redundant code and use new fill rule getter. Change-Id: I3820f3cc9969be9f1daf58b8adedb0a1a1d8d26e --- src/static_libs/vg_common/vg_common_svg.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index c564b35..26f52a6 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -663,9 +663,7 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F grad_geom.w = vg_data->view_box.w; grad_geom.h = vg_data->view_box.h; -#ifndef HAVE_THORVG efl_gfx_path_bounds_get(grad_obj, &grad_geom); -#endif double cy = ((double) grad_geom.h) * 0.5 + grad_geom.y; double cy_scaled = (((double) grad_geom.h) * 0.5) * scale_reversed_Y; @@ -1108,11 +1106,7 @@ _apply_svg_property(Svg_Node *node, Efl_VG *vg) return; } - // apply the fill style property -#ifndef HAVE_THORVG - //FIX_TVG:: replace? - style->fill.fill_rule = efl_gfx_shape_fill_rule_get(vg); -#endif + evas_vg_shape_fill_rule_get(vg, (Evas_Vg_Fill_Rule*)&style->fill.fill_rule); style->fill.paint.none = EINA_FALSE; if (efl_canvas_vg_shape_fill_get(vg)) @@ -1177,15 +1171,8 @@ vg_common_create_svg_node_helper(Efl_VG *vg, Svg_Node *parent) evas_vg_shape_path_length_get(vg, &commands_count, &points_count); svg_node->node.command.commands_count = commands_count; svg_node->node.command.points_count = points_count; -#ifdef HAVE_THORVG svg_node->node.command.commands = (Evas_Vg_Path_Command *) commands; svg_node->node.command.points = (double *) points; -#else - svg_node->node.command.points = calloc(points_count, sizeof(double)); - svg_node->node.command.commands = calloc(commands_count, sizeof(Evas_Vg_Path_Command)); - memcpy(svg_node->node.command.commands, commands, sizeof (Evas_Vg_Path_Command) * commands_count); - memcpy(svg_node->node.command.points, points, sizeof (double) * points_count); -#endif _apply_svg_property(svg_node, vg); } } -- 2.7.4