Fixed image scatter plot export bug (#88)

This commit is contained in:
boylea 2019-11-19 20:03:15 -08:00 committed by Ogi Moore
parent 267a0af8e7
commit b1b2f4662b
2 changed files with 4 additions and 3 deletions

View File

@ -98,8 +98,9 @@ class GraphicsItem(object):
Extends deviceTransform to automatically determine the viewportTransform.
"""
if self._exportOpts is not False and 'painter' in self._exportOpts: ## currently exporting; device transform may be different.
return self._exportOpts['painter'].deviceTransform() * self.sceneTransform()
scaler = self._exportOpts['resolutionScale']
return self.sceneTransform() * QtGui.QTransform(scaler, 0, 0, scaler, 1, 1)
if viewportTransform is None:
view = self.getViewWidget()
if view is None:

View File

@ -781,7 +781,7 @@ class ScatterPlotItem(GraphicsObject):
pts = pts[:,viewMask]
for i, rec in enumerate(data):
p.resetTransform()
p.translate(pts[0,i] + rec['width'], pts[1,i] + rec['width'])
p.translate(pts[0,i] + rec['width'], pts[1,i] + rec['width']/2)
drawSymbol(p, *self.getSpotOpts(rec, scale))
else:
if self.picture is None: