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.
This commit is contained in:
Mira Grudzinska 2021-06-14 23:38:51 +02:00 committed by Hermet Park
parent 26fd6b5dfd
commit a3e784b6b5

View file

@ -2398,7 +2398,8 @@ static void _updateGradient(SvgNode* node, Array<SvgStyleGradient*>* gradients)
} else { } else {
if (node->style->fill.paint.url) { if (node->style->fill.paint.url) {
node->style->fill.paint.gradient = _gradientDup(gradients, 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); node->style->stroke.paint.gradient = _gradientDup(gradients, node->style->stroke.paint.url);
} }
} }