mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
SVG: Ensure that transformed images are positioned correctly
This commit is contained in:
parent
2b52ce105d
commit
b8b77df0ed
1 changed files with 7 additions and 6 deletions
|
|
@ -1203,13 +1203,14 @@ private:
|
|||
setCommonAttributes (*di, xml);
|
||||
di->setImage (image);
|
||||
|
||||
if (additionalTransform != nullptr)
|
||||
di->setTransform (transform.followedBy (*additionalTransform));
|
||||
else
|
||||
di->setTransform (transform);
|
||||
di->setTransformToFit ({ (float) xml->getDoubleAttribute ("x", 0.0), (float) xml->getDoubleAttribute ("y", 0.0),
|
||||
(float) xml->getDoubleAttribute ("width", 0.0), (float) xml->getDoubleAttribute ("height", 0.0) },
|
||||
RectanglePlacement (parsePlacementFlags (xml->getStringAttribute ("preserveAspectRatio").trim())));
|
||||
|
||||
di->setBoundingBox ({ (float) xml->getDoubleAttribute ("x", 0.0), (float) xml->getDoubleAttribute ("y", 0.0),
|
||||
(float) xml->getDoubleAttribute ("width", 0.0), (float) xml->getDoubleAttribute ("height", 0.0) });
|
||||
if (additionalTransform != nullptr)
|
||||
di->setTransform (di->getTransform().followedBy (transform).followedBy (*additionalTransform));
|
||||
else
|
||||
di->setTransform (di->getTransform().followedBy (transform));
|
||||
|
||||
return di;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue