svg_loader: paintOrder property properly copied

The paintOrder property set by the style was
not being copied. Now fixed.
This commit is contained in:
Mira Grudzinska 2024-05-03 11:27:13 +02:00 committed by Hermet Park
parent b5b52d6d61
commit 7779912219

View file

@ -49,6 +49,14 @@ static void _copyStyle(SvgStyleProperty* to, const SvgStyleProperty* from)
to->flagsImportance = (to->flagsImportance | SvgStyleFlags::Color); to->flagsImportance = (to->flagsImportance | SvgStyleFlags::Color);
} }
} }
if (((from->flags & SvgStyleFlags::PaintOrder) && !(to->flags & SvgStyleFlags::PaintOrder)) ||
_isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::PaintOrder)) {
to->paintOrder = from->paintOrder;
to->flags = (to->flags | SvgStyleFlags::PaintOrder);
if (from->flagsImportance & SvgStyleFlags::PaintOrder) {
to->flagsImportance = (to->flagsImportance | SvgStyleFlags::PaintOrder);
}
}
//Fill //Fill
if (((from->fill.flags & SvgFillFlags::Paint) && !(to->flags & SvgStyleFlags::Fill)) || if (((from->fill.flags & SvgFillFlags::Paint) && !(to->flags & SvgStyleFlags::Fill)) ||
_isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::Fill)) { _isImportanceApplicable(to->flagsImportance, from->flagsImportance, SvgStyleFlags::Fill)) {