From e96f908b956c75e9b31173d1b74fdb4b89b284d8 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Tue, 21 Mar 2023 23:27:00 +0100 Subject: [PATCH] svg_loader: invalid strokes' width set to zero 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 --- src/loaders/svg/tvgSvgSceneBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loaders/svg/tvgSvgSceneBuilder.cpp b/src/loaders/svg/tvgSvgSceneBuilder.cpp index f00b373..50097e4 100644 --- a/src/loaders/svg/tvgSvgSceneBuilder.cpp +++ b/src/loaders/svg/tvgSvgSceneBuilder.cpp @@ -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); -- 2.7.4