Any ideas how to deal with number 1 ? On Wednesday, March 28, 2018 at 10:57:37 PM UTC+2, [email protected] wrote: > > > I've discovered two unexpected behaviors when using the maxBounds argument > with pyqtgraph ROIs: > > 1) The position of the line segment ROI does not appear to be constrained > by maxBounds, regardless of which dimensions I choose for the maxBounds > QRectF values: > > line = pg.LineSegmentROI([[20,20], [80,80]], pen='r', movable=False, > maxBounds=QtCore.QRectF(0, 0, 100, 100)) > > In this case, I am able to move the line segment handles anywhere I please. > > 2) The area constrained by other ROIs does not take their rotation angle > into account. With the following ROI: > > rect = pg.RectROI([50, 50], [20, 30], pen='r', movable=True, > maxBounds=QtCore.QRectF(0, 0, 100, 100)) > rect.addRotateHandle([0,1], [0.5, 0.5]) > > I am not able to move the rect ROI outside of the are defined by maxBounds > (with rect.angle() = 0), however, if I rotate the ROI, portions of the > rectangle will exceed the area defined by maxBounds. It appears as though > the area defined by the handles is constrained (rect.pos(), rect.size()), > however, the angle is not taken into consideration (rect.angle()), > resulting in the rect ROI moving beyond the maxBounds region. > > I am using the most recent version of pyqtgraph: 0.10.0+g53a3087 > > Am I perhaps interpreting the maxBounds limits incorrectly? > > Thanks in advance for your help. >
-- 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/f739693d-15cc-4b0b-ae20-46add2bc8bb3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
