Skip to content

Polygon: boxes with negative bottom or right side are not in the box#173

Merged
vancluever merged 1 commit into
mainfrom
lower-right-not-in-box
Jun 2, 2026
Merged

Polygon: boxes with negative bottom or right side are not in the box#173
vancluever merged 1 commit into
mainfrom
lower-right-not-in-box

Conversation

@vancluever

Copy link
Copy Markdown
Owner

Fixes #172

Our logic was incorrect here with regards to bounds checking - while we technically need to stretch out the box for drawing and length calculations, if one the lower or right extents are negative, nothing will ever be drawn on a surface with (0, 0) at its origin, so this will never be in the box.

@vancluever vancluever added the bug Something isn't working label Jun 2, 2026
Our logic was incorrect here with regards to bounds checking - while we
technically need to stretch out the box for drawing and length
calculations, if one the lower or right extents are negative, nothing
will ever be drawn on a surface with (0, 0) at its origin, so this will
never be in the box.
@vancluever vancluever force-pushed the lower-right-not-in-box branch from 175dd63 to 58724f9 Compare June 2, 2026 03:48
@vancluever vancluever merged commit 830fab8 into main Jun 2, 2026
2 checks passed
@vancluever vancluever deleted the lower-right-not-in-box branch June 2, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@panic("invalid mask dimensions. this is a bug, please report it");

1 participant