Improve click targets to use compound paths so interior negative space is excluded#4096
Improve click targets to use compound paths so interior negative space is excluded#4096
Conversation
…d shape hit testing
There was a problem hiding this comment.
Code Review
This pull request introduces a CompoundPath variant to ClickTargetType, enabling support for the non-zero fill rule to correctly handle shapes with holes, such as the letter 'O'. The changes update the renderer to group subpaths into single compound click targets and adapt bounding box calculations, transformations, and intersection logic across the editor and rendering libraries. Feedback focuses on performance optimizations to reduce redundant matrix transformations and intermediate allocations during path intersection tests, as well as a logic correction to ensure selection behavior for compound paths correctly requires all subpaths to be within the selection area.
Performance Benchmark Results
|
Performance Benchmark Results
|
Previously, we have been treating every subpath as its own click target, so the inner part of an "O" was matched just like the outer, rather than excluded.