From a3e784b6b5cdc96ef9932ee527256cd1664bbae8 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Mon, 14 Jun 2021 23:38:51 +0200 Subject: [PATCH] svg_loader: gradient update takes into account a stroke and a fill For shapes with a grad fill and a grad stroke only the fill was drawn. After this fix both can have a valid gradient. --- src/loaders/svg/tvgSvgLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/loaders/svg/tvgSvgLoader.cpp b/src/loaders/svg/tvgSvgLoader.cpp index 0755ff4e..175fb202 100644 --- a/src/loaders/svg/tvgSvgLoader.cpp +++ b/src/loaders/svg/tvgSvgLoader.cpp @@ -2398,7 +2398,8 @@ static void _updateGradient(SvgNode* node, Array* gradients) } else { if (node->style->fill.paint.url) { node->style->fill.paint.gradient = _gradientDup(gradients, node->style->fill.paint.url); - } else if (node->style->stroke.paint.url) { + } + if (node->style->stroke.paint.url) { node->style->stroke.paint.gradient = _gradientDup(gradients, node->style->stroke.paint.url); } }