Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
SVG generator - precision / size
vania2020 last edited by
I am trying to generate SVGs using QSvgGenerator - the resulting SVGs are huge
when I use 3rd party tools such as https://github.com/svg/svgo to optimize the SVG size - I am able to reduce the size down to something like 6-7 percent of what QSvgGenerator is generating
the biggest effect seams to be reducing the "precision" as described in the svgo help: "-p PRECISION, --precision=PRECISION : Set number of digits in the fractional part"
I was wondering would it be possible to reduce precision directly when generating the SVG? I could not find anything in documentation that would allow for that either in QPainter or QSvgGenerator :(
if its not propagated as an option, maybe it can be tuned somewhere in code?