-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bounding box inconsistencies - different values between 0.28 and 0.44 #831
Comments
I can't really reproduce it, I just tried your example with main (v0.44) and those are the values I'm getting:
those are the values before v0.42:
I'm pretty sure the reason for the change in behavior is that
I believe they should be in pixels. |
Yes, this is the correct output now. There we some changes to what Here is a post-processed SVG: <svg width="40" height="26.666666" xmlns="http://www.w3.org/2000/svg">
<defs/>
<g transform="matrix(1.3333333 0 0 1.3333333 0.00000191 0.00000095)">
<path id="rect-1" fill="#000000" stroke="none" d="M 20 20 L 21.333334 20 L 21.333334 21.333334 L 20 21.333334 Z"/>
</g>
</svg> As you can see, viewBox transform was flattened and will be applied to the rect. Remember that |
Thanks, I'll have to dive deeper into measurement units in SVGz which is a very confusing topic. |
I have noticed some wierd things about measurements returned
resvg --query-all
. The units are not obvious, and measurements have changed from v0.42 onwards.Let's sayy we call
resvg --query-all
on the following SVG file using versions v0.34 to v0.44:We get the following (I used an Elixir project to download the 10 versiona and set things up, the important part are the measurements returned by each version):
I can't find these differences documented anywhere. Is any of these the expected value? Which units should these numbers be? What changes in v0.42? I actualy found about this when using resvg to get some text measurements, where there seems to be further "weirdness", but even the 1pt-side rectangle has left me a bit stumped...
Thanks for any help.
The text was updated successfully, but these errors were encountered: