Check the sampler marker at its painted pixel index

This commit is contained in:
yoriswind committed 2026-12-01 18:13:24 -08:00
1 parent c35196905f
commit 9123df29fc
1 file changed
+2 -1
@@ -105,7 +105,8 @@ fn sampler_mark(shape: &Shape, at: Pos2) -> bool {
}
fn shows_marker(h: &AppHarness) -> bool {
let at = to_screen(h.state(), POINT);
// The engine stores the pixel centre, but the shared ColorSamplers collection uses the pixel index to paint.
let at = to_screen(h.state(), POINT.map(f64::floor));
h.output().shapes.iter().any(|clipped| clipped.clip_rect.contains(at) && sampler_mark(&clipped.shape, at))
}