evas vector: Added stroke's color and width restore after reset. 19/251619/2
authorMichal Szczecinski <m.szczecinsk@partner.samsung.com>
Fri, 15 Jan 2021 14:08:51 +0000 (15:08 +0100)
committerHermet Park <chuneon.park@samsung.com>
Wed, 20 Jan 2021 09:37:24 +0000 (09:37 +0000)
This commit fixes issue with invisible circle progressbars. Thorvg
resets stroke width and color information. We have to set it again to
use reset api in the same way as it is designed in ector mode.

Change-Id: I8310455ba64333ee767b90c0d6002945024e51b6

src/lib/evas/canvas/efl_canvas_vg_shape.c

index 2213a63..3ccfe68 100644 (file)
@@ -363,6 +363,8 @@ _shape_reset(Evas_Vg_Shape *obj)
    Efl_Canvas_Vg_Node_Data *nd = NULL;
    Efl_Canvas_Vg_Shape_Data *sd = NULL;
 
+   uint8_t r, g, b, a;
+
    if (!obj) return;
 
    nd = efl_data_scope_get(obj, EFL_CANVAS_VG_NODE_CLASS);
@@ -379,7 +381,11 @@ _shape_reset(Evas_Vg_Shape *obj)
         sd->fill = NULL;
      }
 
+   tvg_shape_get_stroke_color(sd->shape, &r, &g, &b, &a);
    tvg_shape_reset(sd->shape);
+
+   tvg_shape_set_stroke_width(sd->shape, sd->scale * sd->width);
+   tvg_shape_set_stroke_color(sd->shape, r, g, b, a);
 }
 
 static void