as it turns out, i really was close. instead of taking the points from the 
state, the handle postions needed to be mapped to parent. i adjusted the 
MWE for those who are interested:

import pyqtgraph as pg

def roiMove():
   """Print the coordinates of the ROI."""
   pts = roi.getSceneHandlePositions()
   print([roi.mapSceneToParent(pt[1]) for pt in pts])

win = pg.GraphicsWindow()
vb = win.addViewBox()
# roi in triangle shape
roi = pg.PolyLineROI([[1, 2], [1.5, 2], [1, 0]],
           closed=True,
           pen=pg.mkPen(color=(0, 201, 255, 255), width=3)
               )

# connect to printing function when moving something
roi.sigRegionChanged.connect(roiMove)
vb.addItem(roi)
vb.setXRange(-5, 5)
vb.setYRange(-5, 5)
pg.QtGui.QApplication.exec_()
Code hier eingeben...


-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/0e2eefde-a772-4842-8468-2d4458132b0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to