-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Symptom:
If you use the "draw feature" of a ImageItem while the axisOrder is set to "row-major" the image will be transposed, but the coordiates of the mouse pointer are not.
Example:
Take the default "GraphicsItems/ImageItem - draw" example under pyqtgraph/examples/draw.py and add the line pg.setConfigOptions(imageAxisOrder='row-major') after the imports. Drawing and mouse pointer are now out of sync.
Suggested fix:
In the method ´drawAt()´ replace the line:
pos = [int(pos.x()), int(pos.y())]
with
pos = [int(pos.y()), int(pos.x())] if self.axisOrder == 'row-major' else [int(pos.x()), int(pos.y())]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels