mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
svg_loader: fix transformation order
If a clip was defined by a use node pointing to a basic shape subject to transformation, and the use node itself was translated, the order of applying these transformations was incorrect.
This commit is contained in:
parent
2fb925a2d7
commit
defec5e43b
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ static bool _appendClipChild(SvgLoaderData& loaderData, SvgNode* node, Shape* sh
|
|||
if (node->node.use.x != 0.0f || node->node.use.y != 0.0f) {
|
||||
finalTransform *= {1, 0, node->node.use.x, 0, 1, node->node.use.y, 0, 0, 1};
|
||||
}
|
||||
if (child->transform) finalTransform = *child->transform * finalTransform;
|
||||
if (child->transform) finalTransform *= *child->transform;
|
||||
|
||||
return _appendClipShape(loaderData, child, shape, vBox, svgPath, identity((const Matrix*)(&finalTransform)) ? nullptr : &finalTransform);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue