mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
svg_loader: applying AlphaMask during scene building
The AlphaMask composition case was omitted in the _sceneBuilderHelper().
This commit is contained in:
parent
e8cf21a3c9
commit
f0540d753a
1 changed files with 10 additions and 0 deletions
|
@ -378,6 +378,16 @@ unique_ptr<Scene> _sceneBuildHelper(const SvgNode* node, float vx, float vy, flo
|
|||
scene->composite(move(comp), CompositeMethod::ClipPath);
|
||||
}
|
||||
}
|
||||
//Composite AlphaMask
|
||||
if (((int)node->style->comp.flags & (int)SvgCompositeFlags::AlphaMask)) {
|
||||
auto compNode = node->style->comp.node;
|
||||
if (compNode->child.count > 0) {
|
||||
auto comp = Shape::gen();
|
||||
auto child = compNode->child.data;
|
||||
for (uint32_t i = 0; i < compNode->child.count; ++i, ++child) _appendChildShape(*child, comp.get(), vx, vy, vw, vh);
|
||||
scene->composite(move(comp), CompositeMethod::AlphaMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
scene->opacity(node->style->opacity);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue