SVGExporter: logicalDpiX instead of physicalDpiX
Fixes problems with non-aligning axes on Qt5 svg exports. In the output svg, the axes were (individually) scaled for physical/logical ration.
This commit is contained in:
parent
47d59c51f4
commit
d09fe6bd47
@ -169,7 +169,7 @@ def _generateItemSvg(item, nodes=None, root=None):
|
|||||||
buf = QtCore.QBuffer(arr)
|
buf = QtCore.QBuffer(arr)
|
||||||
svg = QtSvg.QSvgGenerator()
|
svg = QtSvg.QSvgGenerator()
|
||||||
svg.setOutputDevice(buf)
|
svg.setOutputDevice(buf)
|
||||||
dpi = QtGui.QDesktopWidget().physicalDpiX()
|
dpi = QtGui.QDesktopWidget().logicalDpiX()
|
||||||
svg.setResolution(dpi)
|
svg.setResolution(dpi)
|
||||||
|
|
||||||
p = QtGui.QPainter()
|
p = QtGui.QPainter()
|
||||||
|
Loading…
Reference in New Issue
Block a user