svg_loader: invalid strokes' width set to zero 38/290638/1
authorMira Grudzinska <veleveta@gmail.com>
Tue, 21 Mar 2023 22:27:00 +0000 (23:27 +0100)
committerjykeon <jykeon@samsung.com>
Thu, 30 Mar 2023 04:54:36 +0000 (13:54 +0900)
In case the "stroke" attrib is set to "none",
the width of the stroke is set to zero. Thanks
to that it isn't taken into account while
establishing the bounds of the shape.

Change-Id: I65cfd52075b72bebe9f9f4d24d54cde2e1dca99c
Signed-off-by: jykeon <jykeon@samsung.com>
src/loaders/svg/tvgSvgSceneBuilder.cpp

index f00b373322378a760ecbaff723edb2bb1bff4c2e..50097e427cfca75c4793be318d8dc150fdad0008 100644 (file)
@@ -346,7 +346,7 @@ static void _applyProperty(SvgNode* node, Shape* vg, const Box& vBox, const stri
 
     //If stroke property is nullptr then do nothing
     if (style->stroke.paint.none) {
-        //Do nothing
+        vg->stroke(0.0f);
     } else if (style->stroke.paint.gradient) {
         Box bBox = vBox;
         if (!style->stroke.paint.gradient->userSpace) bBox = _boundingBox(vg);