I want to use svgelements to fix some svg files that are generated by a program.
Those svg files are missing the viewBox:
Here is an example svg file:
https://gist.github.com/Emasoft/ccce2973465c2c0a6b165d1135efe1e1
Can svgelements compute the correct viewBox so that when displayed in the browser the above gist will shows the full image, with the right aspect ratio and no empty space?
I tried with the .bbox() method, but the values when used as viewBox values are still wrong. Only a part of the image is shown.
I read that you need to flatten the transforms concatenating all matrix, but how can I do that with svgelements?
I want to use svgelements to fix some svg files that are generated by a program.
Those svg files are missing the viewBox:
Here is an example svg file:
https://gist.github.com/Emasoft/ccce2973465c2c0a6b165d1135efe1e1
Can svgelements compute the correct viewBox so that when displayed in the browser the above gist will shows the full image, with the right aspect ratio and no empty space?
I tried with the .bbox() method, but the values when used as viewBox values are still wrong. Only a part of the image is shown.
I read that you need to flatten the transforms concatenating all matrix, but how can I do that with svgelements?