From 95f97745d95a404478ddbdb94fdd84335336611b Mon Sep 17 00:00:00 2001 From: Michal Szczecinski Date: Tue, 27 Oct 2020 10:47:21 +0100 Subject: [PATCH] static_libs/vg_common/svg: replaced Efl Gfx API by Evas Vg. Efl_Gfx API was replaced to reduce and simplify source codes. Evas_VG decide what kind of API will be used to render vector graphics from edje files. Change-Id: Iea45463826c3c77d719da4b8ee5d7ca229aaac0d --- src/static_libs/vg_common/vg_common.h | 12 +- src/static_libs/vg_common/vg_common_svg.c | 178 ++++++++++++++++++------------ 2 files changed, 112 insertions(+), 78 deletions(-) diff --git a/src/static_libs/vg_common/vg_common.h b/src/static_libs/vg_common/vg_common.h index e9cbb4f..96e3858 100644 --- a/src/static_libs/vg_common/vg_common.h +++ b/src/static_libs/vg_common/vg_common.h @@ -146,7 +146,7 @@ struct _Svg_Custom_Command_Node int points_count; int commands_count; double *points; - Efl_Gfx_Path_Command *commands; + Evas_Vg_Path_Command *commands; }; struct _Svg_Path_Node @@ -207,8 +207,8 @@ struct _Svg_Style_Gradient Svg_Gradient_Type type; Eina_Stringshare *id; Eina_Stringshare *ref; - Efl_Gfx_Gradient_Spread spread; - Eina_List *stops; // Efl_Gfx_Gradient_Stop + Evas_Vg_Gradient_Spread spread; + Eina_List *stops; // Evas_Vg_Gradient_Stop Svg_Radial_Gradient *radial; Svg_Linear_Gradient *linear; Eina_Matrix3 *transform; @@ -269,9 +269,9 @@ struct _Svg_Style_Stroke double scale; double width; double centered; - Efl_Gfx_Cap cap; - Efl_Gfx_Join join; - Efl_Gfx_Dash *dash; + Evas_Vg_Cap cap; + Evas_Vg_Join join; + Evas_Vg_Dash *dash; int dash_count; }; diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 30fc0c0..e5328ea 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -100,13 +100,13 @@ _eet_for_gradient_stops(void) Eet_Data_Descriptor *eet; Eet_Data_Descriptor_Class eetc; - EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eetc, Efl_Gfx_Gradient_Stop); + EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eetc, Evas_Vg_Gradient_Stop); eet = eet_data_descriptor_stream_new(&eetc); - EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Efl_Gfx_Gradient_Stop, "offset", offset, EET_T_DOUBLE); - EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Efl_Gfx_Gradient_Stop, "r", r, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Efl_Gfx_Gradient_Stop, "g", g, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Efl_Gfx_Gradient_Stop, "b", b, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Efl_Gfx_Gradient_Stop, "a", a, EET_T_INT); + EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Evas_Vg_Gradient_Stop, "offset", offset, EET_T_DOUBLE); + EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Evas_Vg_Gradient_Stop, "r", r, EET_T_INT); + EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Evas_Vg_Gradient_Stop, "g", g, EET_T_INT); + EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Evas_Vg_Gradient_Stop, "b", b, EET_T_INT); + EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Evas_Vg_Gradient_Stop, "a", a, EET_T_INT); return eet; } @@ -175,10 +175,10 @@ _eet_for_style_property(void) eet = eet_data_descriptor_stream_new(&eetc); eet_gradient = _eet_for_style_gradient(); - EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eetc_dash, Efl_Gfx_Dash); + EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eetc_dash, Evas_Vg_Dash); eet_dash = eet_data_descriptor_stream_new(&eetc_dash); - EET_DATA_DESCRIPTOR_ADD_BASIC(eet_dash, Efl_Gfx_Dash, "length", length, EET_T_DOUBLE); - EET_DATA_DESCRIPTOR_ADD_BASIC(eet_dash, Efl_Gfx_Dash, "gap", gap, EET_T_DOUBLE); + EET_DATA_DESCRIPTOR_ADD_BASIC(eet_dash, Evas_Vg_Dash, "length", length, EET_T_DOUBLE); + EET_DATA_DESCRIPTOR_ADD_BASIC(eet_dash, Evas_Vg_Dash, "gap", gap, EET_T_DOUBLE); EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Svg_Style_Property, "r", r, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(eet, Svg_Style_Property, "g", g, EET_T_INT); @@ -472,7 +472,7 @@ vg_common_svg_node_eet_destroy(void) static void _svg_style_gradient_free(Svg_Style_Gradient *grad) { - Efl_Gfx_Gradient_Stop *stop; + Evas_Vg_Gradient_Stop *stop; if (!grad) return; @@ -553,7 +553,7 @@ static Efl_VG * _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_data, int fill_opacity) { Efl_VG *grad_obj = NULL; - Efl_Gfx_Gradient_Stop *stops, *stop; + Evas_Vg_Gradient_Stop *stops, *stop; int stop_count = 0, i = 0; Eina_List *l; Eina_Matrix3 m; //for bbox translation @@ -563,6 +563,8 @@ _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 @@ -570,10 +572,17 @@ _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) { - grad_obj = efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent); + grad_obj = evas_vg_gradient_linear_add(parent); if (g->use_percentage) { @@ -609,8 +618,8 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F NULL, NULL, NULL); } - efl_gfx_gradient_linear_start_set(grad_obj, g->linear->x1, g->linear->y1); - efl_gfx_gradient_linear_end_set(grad_obj, g->linear->x2, g->linear->y2); + evas_vg_gradient_linear_start_set(grad_obj, g->linear->x1, g->linear->y1); + evas_vg_gradient_linear_end_set(grad_obj, g->linear->x2, g->linear->y2); } else if (g->type == SVG_RADIAL_GRADIENT) { @@ -633,10 +642,12 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F g->radial->fx = g->radial->fx * r.w + r.x; g->radial->fy = g->radial->fy * r.h + r.y; } - grad_obj = efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent); - efl_gfx_gradient_radial_center_set(grad_obj, g->radial->cx, g->radial->cy); - efl_gfx_gradient_radial_radius_set(grad_obj, g->radial->r); - efl_gfx_gradient_radial_focal_set(grad_obj, g->radial->fx, g->radial->fy); + + grad_obj = evas_vg_gradient_radial_add(parent); + + evas_vg_gradient_radial_center_set(grad_obj, g->radial->cx, g->radial->cy); + evas_vg_gradient_radial_radius_set(grad_obj, g->radial->r); + evas_vg_gradient_radial_focal_set(grad_obj, g->radial->fx, g->radial->fy); /* in case of objectBoundingBox it need proper scaling */ if (!g->user_space) @@ -656,7 +667,14 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F scale_reversed_X = ((double) r.w) / r.h; } + grad_geom.x = vg_data->view_box.x; + grad_geom.y = vg_data->view_box.y; + 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; @@ -686,7 +704,7 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F } // apply common prperty - efl_gfx_gradient_spread_set(grad_obj, g->spread); + evas_vg_gradient_spread_set(grad_obj, g->spread); // update the stops stop_count = eina_list_count(g->stops); @@ -694,8 +712,9 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F { double opacity; double fopacity = ((double) fill_opacity) / 255; //fill opacity if any exists. - stops = calloc(stop_count, sizeof(Efl_Gfx_Gradient_Stop)); + stops = calloc(stop_count, sizeof(Evas_Vg_Gradient_Stop)); i = 0; + EINA_LIST_FOREACH(g->stops, l, stop) { // Use premultiplied color @@ -707,9 +726,10 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F stops[i].offset = stop->offset; i++; } - efl_gfx_gradient_stop_set(grad_obj, stops, stop_count); + evas_vg_gradient_stop_set(grad_obj, stops, stop_count); free(stops); } + return grad_obj; } @@ -725,7 +745,7 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ // apply the transformation if (node->transform) efl_canvas_vg_node_transformation_set(vg, node->transform); - if (node->type != SVG_NODE_DOC && !node->display) efl_gfx_entity_visible_set(vg, EINA_FALSE); + if (node->type != SVG_NODE_DOC && !node->display) evas_vg_node_visible_set(vg, EINA_FALSE); if (node->type == SVG_NODE_DOC) return; @@ -743,14 +763,14 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ { // apply the current style color float fa = ((float) style->fill.opacity / 255); - efl_gfx_color_set(vg, ((float) style->r) * fa, ((float) style->g) * fa, ((float) style->b) * fa, + evas_vg_node_color_set(vg, ((float) style->r) * fa, ((float) style->g) * fa, ((float) style->b) * fa, style->fill.opacity); } else { // apply the fill color float fa = ((float) style->fill.opacity / 255); - efl_gfx_color_set(vg, ((float) style->fill.paint.r) * fa, ((float) style->fill.paint.g) * fa, + evas_vg_node_color_set(vg, ((float) style->fill.paint.r) * fa, ((float) style->fill.paint.g) * fa, ((float) style->fill.paint.b) * fa, style->fill.opacity); } @@ -758,21 +778,25 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ if (style->opacity < 255) { int r, g, b, a; - efl_gfx_color_get(vg, &r, &g, &b, &a); + evas_vg_node_color_get(vg, &r, &g, &b, &a); float fa = ((float) style->opacity / 255); - efl_gfx_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); + evas_vg_node_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); } if (node->type == SVG_NODE_G || node->type == SVG_NODE_CLIP_PATH) return; // apply the fill style property +#ifndef HAVE_THORVG + //TODO: not supported by evas api? efl_gfx_shape_fill_rule_set(vg, style->fill.fill_rule); - efl_gfx_shape_stroke_width_set(vg, style->stroke.width); - efl_gfx_shape_stroke_cap_set(vg, style->stroke.cap); - efl_gfx_shape_stroke_join_set(vg, style->stroke.join); - efl_gfx_shape_stroke_scale_set(vg, style->stroke.scale); +#endif + evas_vg_shape_stroke_width_set(vg, style->stroke.width); + evas_vg_shape_stroke_cap_set(vg, style->stroke.cap); + evas_vg_shape_stroke_join_set(vg, style->stroke.join); + evas_vg_shape_stroke_scale_set(vg, style->stroke.scale); + if (style->stroke.dash && style->stroke.dash_count > 0) - efl_gfx_shape_stroke_dash_set(vg, style->stroke.dash, style->stroke.dash_count); + evas_vg_shape_stroke_dash_set(vg, style->stroke.dash, style->stroke.dash_count); // if stroke property is NULL then do nothing if (style->stroke.paint.none) @@ -793,13 +817,13 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ else if (style->stroke.paint.cur_color) { // apply the current style color - efl_gfx_shape_stroke_color_set(vg, style->r, style->g, + evas_vg_shape_stroke_color_set(vg, style->r, style->g, style->b, style->stroke.opacity); } else { // apply the stroke color - efl_gfx_shape_stroke_color_set(vg, style->stroke.paint.r, style->stroke.paint.g, + evas_vg_shape_stroke_color_set(vg, style->stroke.paint.r, style->stroke.paint.g, style->stroke.paint.b, style->stroke.opacity); } @@ -807,9 +831,9 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ if (style->opacity < 255) { int r, g, b, a; - efl_gfx_shape_stroke_color_get(vg, &r, &g, &b, &a); + evas_vg_shape_stroke_color_get(vg, &r, &g, &b, &a); float fa = ((float) style->opacity / 255); - efl_gfx_shape_stroke_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); + evas_vg_shape_stroke_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa); } } @@ -820,12 +844,12 @@ _add_polyline(Efl_VG *vg, double *array, int size, Eina_Bool polygon) if (size < 2) return; - efl_gfx_path_append_move_to(vg, array[0], array[1]); + evas_vg_shape_append_move_to(vg, array[0], array[1]); for (i=2; i < size; i+=2) - efl_gfx_path_append_line_to(vg, array[i], array[i+1]); + evas_vg_shape_append_line_to(vg, array[i], array[i+1]); if (polygon) - efl_gfx_path_append_close(vg); + evas_vg_shape_append_close(vg); } static Efl_VG * @@ -865,10 +889,11 @@ vg_common_create_vg_node_helper(Svg_Node *node, Efl_VG *parent, Vg_File_Data *vg { Efl_VG *vg = vg_common_create_vg_node_helper(child, comp_vg_container, vg_data); // clippath does not require color blending. That's why we keep 255 opacity. - efl_gfx_color_set(vg, 255, 255, 255, 255); + evas_vg_node_color_set(vg, 255, 255, 255, 255); } // Composition matte alpha + //TODO: not supported yet. efl_canvas_vg_node_comp_method_set(comp_parent, comp_vg_container, EFL_GFX_VG_COMPOSITE_METHOD_MATTE_ALPHA); parent = comp_parent; // replace parent @@ -891,7 +916,7 @@ vg_common_create_vg_node_helper(Svg_Node *node, Efl_VG *parent, Vg_File_Data *vg break; case SVG_NODE_PATH: vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); - efl_gfx_path_append_svg_path(vg, node->node.path.path); + evas_vg_shape_append_svg_path(vg, node->node.path.path); break; case SVG_NODE_POLYGON: vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); @@ -903,28 +928,28 @@ vg_common_create_vg_node_helper(Svg_Node *node, Efl_VG *parent, Vg_File_Data *vg break; case SVG_NODE_ELLIPSE: vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); - efl_gfx_path_append_arc(vg, node->node.ellipse.cx - node->node.ellipse.rx, + evas_vg_shape_append_arc(vg, node->node.ellipse.cx - node->node.ellipse.rx, node->node.ellipse.cy - node->node.ellipse.ry, 2*node->node.ellipse.rx, 2*node->node.ellipse.ry, 0, 360); - efl_gfx_path_append_close(vg); + evas_vg_shape_append_close(vg); break; case SVG_NODE_CIRCLE: vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); - efl_gfx_path_append_circle(vg, node->node.circle.cx, node->node.circle.cy, node->node.circle.r); + evas_vg_shape_append_circle(vg, node->node.circle.cx, node->node.circle.cy, node->node.circle.r); break; case SVG_NODE_RECT: vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); - efl_gfx_path_append_rect(vg, node->node.rect.x, node->node.rect.y, node->node.rect.w, node->node.rect.h, + evas_vg_shape_append_rect(vg, node->node.rect.x, node->node.rect.y, node->node.rect.w, node->node.rect.h, node->node.rect.rx, node->node.rect.ry); break; case SVG_NODE_LINE: vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); - efl_gfx_path_append_move_to(vg, node->node.line.x1, node->node.line.y1); - efl_gfx_path_append_line_to(vg, node->node.line.x2, node->node.line.y2); + evas_vg_shape_append_move_to(vg, node->node.line.x1, node->node.line.y1); + evas_vg_shape_append_line_to(vg, node->node.line.x2, node->node.line.y2); break; case SVG_NODE_CUSTOME_COMMAND: vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); - efl_gfx_path_set(vg, node->node.command.commands, node->node.command.points); + evas_vg_shape_path_set(vg, node->node.command.commands, node->node.command.points); break; default: break; @@ -990,9 +1015,9 @@ _create_node(Svg_Node *parent, Svg_Node_Type type) // default stroke width is 1 node->style->stroke.width = 1; // default line cap is butt - node->style->stroke.cap = EFL_GFX_CAP_BUTT; + node->style->stroke.cap = EVAS_VG_CAP_BUTT; // default line join is miter - node->style->stroke.join = EFL_GFX_JOIN_MITER; + node->style->stroke.join = EVAS_VG_JOIN_MITER; node->style->stroke.scale = 1.0; node->style->opacity = 255; @@ -1008,40 +1033,45 @@ _create_node(Svg_Node *parent, Svg_Node_Type type) static Svg_Style_Gradient* _create_gradient_node(Efl_VG *vg) { - const Efl_Gfx_Gradient_Stop *stops = NULL; - Efl_Gfx_Gradient_Stop *new_stop; + const Evas_Vg_Gradient_Stop *stops = NULL; + Evas_Vg_Gradient_Stop *new_stop; + unsigned int count = 0, i; Svg_Style_Gradient *grad = calloc(1, sizeof(Svg_Style_Gradient)); EINA_SAFETY_ON_NULL_RETURN_VAL(grad, NULL); - grad->spread = efl_gfx_gradient_spread_get(vg); - efl_gfx_gradient_stop_get(vg, &stops, &count); + grad->spread = evas_vg_gradient_spread_get(vg); + evas_vg_gradient_stop_get(vg, &stops, &count); + for (i = 0; i < count; i++) { - new_stop = calloc(1, sizeof(Efl_Gfx_Gradient_Stop)); + new_stop = calloc(1, sizeof(Evas_Vg_Gradient_Stop)); if (!new_stop) goto oom_error; - memcpy(new_stop, stops, sizeof(Efl_Gfx_Gradient_Stop)); + memcpy(new_stop, stops, sizeof(Evas_Vg_Gradient_Stop)); grad->stops = eina_list_append(grad->stops, new_stop); stops++; } + if (efl_isa(vg, EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS)) { grad->type = SVG_LINEAR_GRADIENT; grad->linear = calloc(1, sizeof(Svg_Linear_Gradient)); if (!grad->linear) goto oom_error; - efl_gfx_gradient_linear_start_get(vg, &grad->linear->x1, &grad->linear->y1); - efl_gfx_gradient_linear_end_get(vg, &grad->linear->x2, &grad->linear->y2); + + evas_vg_gradient_linear_start_get(vg, &grad->linear->x1, &grad->linear->y1); + evas_vg_gradient_linear_end_get(vg, &grad->linear->x2, &grad->linear->y2); } else { grad->type = SVG_RADIAL_GRADIENT; grad->radial = calloc(1, sizeof(Svg_Radial_Gradient)); if (!grad->radial) goto oom_error; - efl_gfx_gradient_radial_center_get(vg, &grad->radial->cx, &grad->radial->cy); - efl_gfx_gradient_radial_focal_get(vg, &grad->radial->fx, &grad->radial->fy); - grad->radial->r = efl_gfx_gradient_radial_radius_get(vg); + evas_vg_gradient_radial_center_get(vg, &grad->radial->cx, &grad->radial->cy); + evas_vg_gradient_radial_focal_get(vg, &grad->radial->fx, &grad->radial->fy); + grad->radial->r = evas_vg_gradient_radial_radius_get(vg); } + grad->use_percentage = EINA_FALSE; return grad; @@ -1070,13 +1100,17 @@ _apply_svg_property(Svg_Node *node, Efl_VG *vg) node->id = eina_stringshare_add(id); } - node->display = efl_gfx_entity_visible_get(vg); + node->display = evas_vg_node_visible_get(vg); if (node->type == SVG_NODE_G) return; // apply the fill style property +#ifndef HAVE_THORVG + //TODO: fill rule api missing in evas style->fill.fill_rule = efl_gfx_shape_fill_rule_get(vg); +#endif style->fill.paint.none = EINA_FALSE; + if (efl_canvas_vg_shape_fill_get(vg)) { // if the fill has gradient then apply. @@ -1084,7 +1118,7 @@ _apply_svg_property(Svg_Node *node, Efl_VG *vg) } else { - efl_gfx_color_get(vg, &style->fill.paint.r, &style->fill.paint.g, + evas_vg_node_color_get(vg, &style->fill.paint.r, &style->fill.paint.g, &style->fill.paint.b, &style->fill.opacity); } @@ -1099,14 +1133,14 @@ _apply_svg_property(Svg_Node *node, Efl_VG *vg) else { // apply the stroke color - efl_gfx_shape_stroke_color_get(vg, &style->stroke.paint.r, &style->stroke.paint.g, + evas_vg_shape_stroke_color_get(vg, &style->stroke.paint.r, &style->stroke.paint.g, &style->stroke.paint.b, &style->stroke.opacity); } - style->stroke.width = efl_gfx_shape_stroke_width_get(vg); - style->stroke.cap = efl_gfx_shape_stroke_cap_get(vg); - style->stroke.join = efl_gfx_shape_stroke_join_get(vg); - style->stroke.scale = efl_gfx_shape_stroke_scale_get(vg); + style->stroke.width = evas_vg_shape_stroke_width_get(vg); + style->stroke.cap = evas_vg_shape_stroke_cap_get(vg); + style->stroke.join = evas_vg_shape_stroke_join_get(vg); + style->stroke.scale = evas_vg_shape_stroke_scale_get(vg); } static void @@ -1115,7 +1149,7 @@ vg_common_create_svg_node_helper(Efl_VG *vg, Svg_Node *parent) Eina_Iterator *it; Efl_VG *child; Svg_Node *svg_node; - const Efl_Gfx_Path_Command *commands; + const Evas_Vg_Path_Command *commands; unsigned int points_count, commands_count; const double *points; @@ -1133,13 +1167,13 @@ vg_common_create_svg_node_helper(Efl_VG *vg, Svg_Node *parent) else if (efl_isa(vg, EFL_CANVAS_VG_SHAPE_CLASS)) { svg_node = _create_node(parent, SVG_NODE_CUSTOME_COMMAND); - efl_gfx_path_get(vg, &commands, &points); - efl_gfx_path_length_get(vg, &commands_count, &points_count); + evas_vg_shape_path_get(vg, &commands, &points); + 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; svg_node->node.command.points = calloc(points_count, sizeof(double)); - svg_node->node.command.commands = calloc(commands_count, sizeof(Efl_Gfx_Path_Command)); - memcpy(svg_node->node.command.commands, commands, sizeof (Efl_Gfx_Path_Command) * commands_count); + 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); _apply_svg_property(svg_node, vg); } -- 2.7.4