From 64028bceb2e336af3f21c06004d3bc90105ec725 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 06:48:45 -0800 Subject: [PATCH] Effects: the painted clipping type test checks the region Offset Path grows The Offset Path case of painted_clipping_type_survives_enclosing_geometry_effect now also checks the clip region against the type's own outline grown by 1 pt, so a clip region that skips the effect fails the test even when the fill and stroke art skip it too. --- crates/effects/src/tests/clipfx.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/effects/src/tests/clipfx.rs b/crates/effects/src/tests/clipfx.rs index 0f6ccc5ea6..d13c59f229 100644 --- a/crates/effects/src/tests/clipfx.rs +++ b/crates/effects/src/tests/clipfx.rs @@ -636,6 +636,9 @@ fn painted_clipping_type_survives_enclosing_geometry_effect() { let (region, fills, strokes, inside) = found.unwrap_or_else(|| panic!("{case}: no clip group")); if effect.id == "distort.transform" { assert!((region.y0 - plain.y0 - 10.0).abs() < 0.5 && (region.x0 - plain.x0).abs() < 0.5, "{case}: {region:?} from {plain:?}"); + } else { + let grown = Rect::new(plain.x0 - 1.0, plain.y0 - 1.0, plain.x1 + 1.0, plain.y1 + 1.0); + assert!(near_rect(region, grown), "{case}: {region:?} is {plain:?} offset by 1 pt"); } assert_eq!(fills.is_some(), fill, "{case}: fill art {fills:?}"); assert_eq!(strokes.is_some(), stroke, "{case}: stroke art {strokes:?}");