You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
2) test query dimensions (ResvgTestMinimal)
test/resvg_test_minimal_test.exs:92
** (RuntimeError) A number of outputs was returned by the different resvg versions.
The versions grouped by output are the following:
===== v0.42.0, v0.43.0, v0.44.0 ========
rect-1,260.417,260.417,17.361,17.361
===== v0.34.0, v0.35.0, v0.36.0, v0.37.0, v0.38.0, v0.39.0, v0.40.0, v0.41.0 ========
rect-1,62.5,62.5,4.167,4.167
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:
I can't really reproduce it, I just tried your example with main (v0.44) and those are the values I'm getting:
rect-1,26.667,26.667,1.778,1.778
those are the values before v0.42:
20,20,1.333,1.333
I'm pretty sure the reason for the change in behavior is that usvg now also flattens the viewBox, meaning that the bounding box includes the transforms that is applied to account for the view box. If I remove the viewBox, I get the same values as before.
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: