Selection: a click on a drop shadow or glow selects the object under it

Clicks, the hover pointer and marquees with the selection tools already
leave out the area that raster effects paint beyond an object. New tests
in crates/engine/src/tests/select_effects.rs hold that in place for drop
shadows, Outer Glow and Gaussian Blur on paths, groups, point type,
symbol art and images, for Shift-click, Direct Selection, the hover
pointer, a drag from a selected object's shadow and a marquee. hit_leaf
gets a doc comment, and docs/target-app-parity.md gets a line citing
https://helpx.adobe.com/illustrator/using/selecting-objects.html.
This commit is contained in:
dotCooCoo
2026-11-11 18:31:51 -08:00
parent 7f3a046b18
commit 2a5f8d8d5d
4 changed files with 242 additions and 0 deletions
+4
View File
@@ -795,6 +795,10 @@ thread_local! {
static LEAVES_TESTED: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
}
/// What a click at `p` hits on leaf object `n`: its outline, strokes and fills, its frame or its
/// bounds, by kind. Raster effects (drop shadows, glows, blurs) do not take clicks: the area they
/// paint beyond the object is left out here and in [`cull_reach`], so a click there reaches the
/// object under it.
fn hit_leaf(n: &Node, p: Point, opt: HitOptions, symbols: &SymbolBoxes) -> Option<HitKind> {
#[cfg(test)]
LEAVES_TESTED.with(|c| c.set(c.get() + 1));