From 1d88ec9e4836a8e20ff75191a5793e2c75901407 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Mon, 5 Apr 2021 15:33:49 +0200 Subject: [PATCH] evas vg: fixing the compatibility issue 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c index 820f201..a0b42b8 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_shape.c +++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c @@ -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); -- 2.7.4