fix: marquee drags show marching ants, and the elliptical one an ellipse - #76
Merged
Conversation
`Overlay::AntsRect` promises dashed marching ants, but the canvas painted it through the same arm as `Overlay::Rect` -- a solid blue outline. Give it its own arm that traces the four corners through `push_ants`, closing the loop so the dashes carry round the last corner. `Overlay::Rect` keeps the solid outline, which is what layer bounds and artboards want. The elliptical marquee also reported its drag as the rect it was dragged out of rather than the shape it commits, so it now emits a polygon of the inscribed ellipse -- same centre and radii as `Selection::select_ellipse`, so the preview and the committed outline agree. The blue box was on the crop, slice and patch drags too; they get ants now as well. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dragging a marquee drew a solid blue rectangle instead of the marching ants the rest of the app uses for selections — and the elliptical marquee drew that rectangle even though it commits an ellipse.
Overlay::AntsRectis documented as "dashed marching ants", but the canvas painted it through the same match arm asOverlay::Rect, i.e. a solid0x44AAFFoutline. It gets its own arm now, tracing the four corners throughpush_ants(closed, so the dashes carry round the last corner).Overlay::Rectkeeps the solid outline, which is what layer bounds during a move, artboards and the transform box want.AntsRectof the rect it was dragged out of. It now emits anAntsPolygonof the inscribed ellipse — same centre and radii asSelection::select_ellipse, segment count scaled from the rect size and clamped to 24..256 — so the preview matches the outline that appears on mouse-up.The same blue box was on the crop tool, the slice tool and the patch/retouch drag, which all emit
AntsRect; they get ants now too.Verified in the app (headless X, fixture PNG): the rectangular drag shows ants with no blue box, and the elliptical drag shows an ellipse that lands exactly on the committed selection outline.
🤖 Generated with Claude Code