mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
loaders svg: fix invalid clip path result.
tvg engine expects the valid clippath with valid colors, loaders set any colors values to enable it. this fixes invalid clippath behavior.
This commit is contained in:
parent
818d24fc70
commit
6239eca92f
1 changed files with 2 additions and 0 deletions
|
@ -271,6 +271,7 @@ void _applyProperty(SvgNode* node, Shape* vg, float vx, float vy, float vw, floa
|
|||
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);
|
||||
comp->fill(0, 0, 0, 255);
|
||||
vg->composite(move(comp), CompositeMethod::ClipPath);
|
||||
}
|
||||
}
|
||||
|
@ -375,6 +376,7 @@ unique_ptr<Scene> _sceneBuildHelper(const SvgNode* node, float vx, float vy, flo
|
|||
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);
|
||||
comp->fill(0, 0, 0, 255);
|
||||
scene->composite(move(comp), CompositeMethod::ClipPath);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue