Skip to content

close ROI handle subpath#2949

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:close-roi-handle
Mar 7, 2024
Merged

close ROI handle subpath#2949
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:close-roi-handle

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Mar 4, 2024

this ensures that the path is a closed polygon.
this matters for PenCap and PenJoin purposes.

test_PolylineROI has the following series of test images:

  1. init
  2. hover_roi
  3. drag_roi
  4. hover_handle
  5. drag_handle
  6. hover_segment
  7. click_segment
  8. drag_new_handle
  9. clear

Prior to this PR, aarch64 (and ppc64le) platforms fail at init. (See #2110)
With this PR, the failure occurs later at click_segment (and drag_new_handle)

When the path is not closed, we end up with a polyline with its ends rendered with SquareCap, which according to Qt docs: "a square line end that covers the end point and extends beyond it by half the line width."
It does so happen that the failing pixels in init correspond to the closing point of the ROI handle.

Failure screenshot for click_segment. For this case, a lot more pixels are involved.
Screenshot 2024-03-04 230107

this ensures that the path is a closed polygon.
this matters for PenCap and PenJoin purposes.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Mar 7, 2024

Thanks for the investigation @pijyoi and the partial improvement!

@j9ac9k j9ac9k merged commit c761524 into pyqtgraph:master Mar 7, 2024
@pijyoi pijyoi deleted the close-roi-handle branch March 7, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants