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
SVG allows relative coordinates, so it's important to avoid a systematic error by accumulation rounding errors from the every coordinate. I believe the rounding procedure should work with absolute coordinates. So, the conversion must be done before the rounding.
you're right, and that's how it happens in the existing convertPathData plugin.
first - convert absolute to relative, and only then - floating-point numbers rouding.
but there is a problem with the absolute->relative convertion that is not dependent on svgo own rounding - some browsers rounds relative coordinates calculation in their own way, and as a result it's impossible to get a "pixel lossless" optimization.
No, no, no. I was saying quite opposite: first, convert to absolute if needed, then round the values, and then you can convert back to the relative. Otherwise the error will be accumulated on each path step.
like in convertPathData plugin but at least for polyline and polygon data.
but if the default width/height are very small then increase the accuracy or do something else to reduce distortion.
The text was updated successfully, but these errors were encountered: