#13469 - selecting one item does select several - circle only select …#75
Conversation
|
Session summary
Tests added across SvgHitTests.cs and SelectionToolTests.cs: circle/ellipse no-fill center-miss/border-hit cases, two-layered-rectangle z-order, thick-vs-thin stroke tolerance, no-stroke gets no bonus tolerance, and end-to-end tap-vs-area selection on overlapping rectangles. |
|
But this should work similar for all tools we provide:
|
gentledepp
left a comment
There was a problem hiding this comment.
Scope — the outline / path hit-testing changes look out of scope for this PR.
The stated goal of #13469 is the select-topmost fix, and that part (the maxItems = 1 change in SelectionTool) is correct and well covered by the new tests.
However this PR also introduces a second, independent feature: border/outline hit-testing for unfilled shapes — the new IntersectsWith overrides on SvgCircle/SvgEllipse, the GetStrokeHitTestTolerance / ScaleTolerance plumbing, and the stroke-tolerance wiring across SvgLine / SvgPolygon / SvgPolyline / SvgRectangle / SvgPath.
Please pull the outline/path hit-testing work into its own PR and keep this one limited to the select-topmost fix. See the inline note on SvgCircle.IntersectsWith for the consistency requirement if any of it does stay.
(Verified locally: checked the branch out into a worktree and ran the new suites — Svg.Editor.Core.Tests 4/4 and the new Svg.Tests.Win hit-test cases 18/18 pass.)
3863c2b to
3de87f1
Compare
…r on tap Tapping a point now only selects the top-most (highest z-order) element under it, instead of every overlapping element - dragging a selection area still selects everything it contains.
3de87f1 to
6a1e794
Compare
…bounding box and select highest layer