In what Units does QSvgGenerator operate in?

289 views Asked by At

In the official documentation for QSvgGenerator there are two properties that relate to the size of the output. One is size and the other is resolution.

Resolution is set in DPI (Dots Per Inch), but which unit is size in?

I have tested multiple values now and none make sense to me when inspecting the output file.

1

There are 1 answers

0
OJW On

size is in pixels. If you treat size as pixels then the output SVG width and height attributes will be approximately the correct number of mm.