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]],
           pen=pg.mkPen(color=(0, 201, 255, 255), width=3)

# connect to printing function when moving something
vb.setXRange(-5, 5)
vb.setYRange(-5, 5)
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 view this discussion on the web visit
For more options, visit

Reply via email to