@Patrick beware -- Your solution is great when an ROI updates normally. 
Keep in mind though that you can drag a rectangle handle "backwards" 
through the top-left corner of the shape (such that what once was the 
top-left corner becomes the bottom right), in which case the bounding sizes 
are negative. When this happens, artifacts remain.

On Tuesday, March 10, 2020 at 3:48:34 PM UTC-4, yunsong zhao wrote:
>
> Hi there, 
>
> I get a problem when using the ROI.
> If I set the width of the ROI's pen bigger than 1, it does not refresh 
> correctly when moved, as is shown in the following image .
> [image: img.png]
>
>
>
>
>
>
>
>
>
>
> To get the image, I modified the image analysis example as follows:
>
> roi = pg.ROI([-8, 14], [6, 5])
> roi.addScaleHandle([0.5, 1], [0.5, 0.5])
> roi.addScaleHandle([0, 0.5], [0.5, 0.5])
> roi.setPen("r", width=10) # I added this line
> p1.addItem(roi)
>
> roi.setZValue(10) 
>
> Thanks!
>

-- 
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/9f55768c-ad1c-47de-8574-6ac7288dd782o%40googlegroups.com.

Reply via email to