mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
svg: removed an unnecessary nested scene.
This commit is contained in:
parent
92288c8291
commit
56d4628ee1
1 changed files with 3 additions and 7 deletions
|
@ -862,15 +862,11 @@ Scene* svgSceneBuild(SvgLoaderData& loaderData, Box vBox, float w, float h, Aspe
|
|||
}
|
||||
|
||||
auto viewBoxClip = Shape::gen();
|
||||
viewBoxClip->appendRect(0, 0, w, h, 0, 0);
|
||||
viewBoxClip->fill(0, 0, 0);
|
||||
|
||||
auto compositeLayer = Scene::gen();
|
||||
compositeLayer->composite(std::move(viewBoxClip), CompositeMethod::ClipPath);
|
||||
compositeLayer->push(std::move(docNode));
|
||||
viewBoxClip->appendRect(0, 0, w, h);
|
||||
|
||||
auto root = Scene::gen();
|
||||
root->push(std::move(compositeLayer));
|
||||
root->composite(std::move(viewBoxClip), CompositeMethod::ClipPath);
|
||||
root->push(std::move(docNode));
|
||||
|
||||
loaderData.doc->node.doc.vx = vBox.x;
|
||||
loaderData.doc->node.doc.vy = vBox.y;
|
||||
|
|
Loading…
Add table
Reference in a new issue