SVG positioning bug


#1

The following SVG renders wrong using JUCE (for example when loading it in Projucer):

<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
    <g transform="scale(2)">
        <rect x="-50" y="-50" width="100" height="100" fill="green" />
        <text x="0" y="50" font-size="50">
            Hello World!
        </text>
    </g>
</svg>

In Projucer it looks like this:

But in Firefox/Safari/Chrome it looks like this:

The position of the text is different. I believe that might have something to do with moving of sub-components DrawableComposite::updateBoundsToFitChildren() interacts with components which have transforms.


#2

This is fixed on develop.


#3

Thanks for the response!
Just tested it with the new fix and the example file I provided still looks wrong here - same as it looked before…