evas vg: fixing the compatibility issue 97/256497/2
authorMira Grudzinska <m.grudzinska@samsung.com>
Mon, 5 Apr 2021 13:33:49 +0000 (15:33 +0200)
committerHermet Park <chuneon.park@samsung.com>
Wed, 7 Apr 2021 11:02:05 +0000 (11:02 +0000)
The circle, ellipse, and rectangle append functions required an additional
move_to command, so that the results obtained from EVAS with and without TVG
are the same.

Change-Id: Ib58fbd6cf217b0622f51a2c0d576f0ad9eb1656c

src/lib/evas/canvas/efl_canvas_vg_shape.c

index 820f201..a0b42b8 100644 (file)
@@ -1478,6 +1478,7 @@ evas_vg_shape_append_circle(Evas_Vg_Shape *obj, double x, double y, double radiu
    if (!sd || !sd->shape) return;
 
    tvg_shape_append_circle(sd->shape, x, y, radius, radius);
+   tvg_shape_move_to(sd->shape, x + radius, y);
    _assign_current_point(sd, NULL, x + radius, y);
 #else
    efl_gfx_path_append_circle(obj, x, y, radius);
@@ -1495,7 +1496,8 @@ evas_vg_shape_append_ellipse(Evas_Vg_Shape *obj, double cx, double cy, double rx
    if (!sd || !sd->shape) return;
 
    tvg_shape_append_circle(sd->shape, cx, cy, rx, ry);
-   _assign_current_point(sd, NULL, cx, cy - ry);
+   tvg_shape_move_to(sd->shape, cx + rx, cy);
+   _assign_current_point(sd, NULL, cx + rx, cy);
 #else
    efl_gfx_path_append_arc(obj, cx - rx, cy - ry, 2 * rx, 2 * ry, 0, 360);
 #endif
@@ -1512,6 +1514,7 @@ evas_vg_shape_append_rect(Evas_Vg_Shape *obj, double x, double y, double w, doub
    if (!sd || !sd->shape) return;
 
    tvg_shape_append_rect(sd->shape, x, y, w, h, rx, ry);
+   tvg_shape_move_to(sd->shape, x, y + ry);
    _assign_current_point(sd, NULL, x, y + ry);
 #else
    efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry);