mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
svg_loader: fix opacity cloning
The opacity value should be copied along with other node properties.
This commit is contained in:
parent
edc63ce28e
commit
d55b8afd6a
1 changed files with 4 additions and 0 deletions
|
@ -1104,6 +1104,7 @@ static void _handleFillRuleAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node,
|
|||
|
||||
static void _handleOpacityAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node, const char* value)
|
||||
{
|
||||
node->style->flags = (node->style->flags | SvgStyleFlags::Opacity);
|
||||
node->style->opacity = _toOpacity(value);
|
||||
}
|
||||
|
||||
|
@ -2962,6 +2963,9 @@ static void _styleCopy(SvgStyleProperty* to, const SvgStyleProperty* from)
|
|||
to->color = from->color;
|
||||
to->curColorSet = true;
|
||||
}
|
||||
if (from->flags & SvgStyleFlags::Opacity) {
|
||||
to->opacity = from->opacity;
|
||||
}
|
||||
if (from->flags & SvgStyleFlags::PaintOrder) {
|
||||
to->paintOrder = from->paintOrder;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue