evas: vg: fixing the compatibility issue 94/256594/1
authorMira Grudzinska <m.grudzinska@samsung.com>
Wed, 7 Apr 2021 22:09:31 +0000 (00:09 +0200)
committerMira Grudzinska <m.grudzinska@samsung.com>
Wed, 7 Apr 2021 22:09:31 +0000 (00:09 +0200)
The current point value is set after setting the path and after
appending the svg path.

Change-Id: Iccf181cd10433ccdca7d8fdc6c4bb65ea75da526

src/lib/evas/canvas/efl_canvas_vg_shape.c

index a0b42b8..fddf4be 100644 (file)
@@ -1160,6 +1160,10 @@ evas_vg_shape_path_set(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command *op, const
    tvg_shape_append_path(_get_tvg_shape(obj), commands, cmd_length - 1, pts, pts_length / 2);
    free(pts);
    free(commands);
+
+   Efl_Canvas_Vg_Shape_Data *sd = _get_shape_data(obj);
+   if (!sd) return;
+   _assign_current_point(sd, NULL, points[pts_length - 2], points[pts_length - 1]);
 #else
    efl_gfx_path_set(obj, (const Efl_Gfx_Path_Command *)op, points);
 #endif
@@ -1554,6 +1558,8 @@ evas_vg_shape_append_svg_path(Evas_Vg_Shape *obj, const char *svg_path_data)
      }
 
    tvg_shape_append_path(sd->shape, svg_path.cmds, svg_path.cmds_cnt, svg_path.pts, svg_path.pts_cnt);
+   _assign_current_point(sd, NULL, cur_x, cur_y);
+   _assign_current_ctrl_point(sd, cur_ctl_x, cur_ctl_y);
 
    if (svg_path.cmds) free(svg_path.cmds);
    if (svg_path.pts) free(svg_path.pts);