From c98570fd8a85aa94d91a1e7fff190f3815656ed1 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Tue, 8 Sep 2026 15:14:43 +0000 Subject: [PATCH] Read the stroke weight from the paint list in the clip path test --- node-graph/libraries/graphic-types/src/graphic/paint.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/node-graph/libraries/graphic-types/src/graphic/paint.rs b/node-graph/libraries/graphic-types/src/graphic/paint.rs index 8120b1d12a..e537d1cce8 100644 --- a/node-graph/libraries/graphic-types/src/graphic/paint.rs +++ b/node-graph/libraries/graphic-types/src/graphic/paint.rs @@ -45,9 +45,10 @@ pub fn vector_can_reduce_to_clip_path>(source: & let fill_opaque_or_absent = paint_graphics::(source, index).is_none_or(|graphic_list| graphic_list.element(0).is_none_or(|graphic| graphic.is_guaranteed_fully_opaque())); - // Master deleted `Vector::stroke`, so the stroke width term has no source here; only the paint term is left, which reduces to a clip path less often but never wrongly. - let stroke_invisible_or_transparent = - paint_graphics::(source, index).is_none_or(|graphic_list| graphic_list.element(0).is_none_or(|graphic| graphic.is_guaranteed_fully_transparent())); + // The stroke weight rides the stroke paint list, the carrier that replaced the deleted `Vector::stroke` field. + let stroke_invisible_or_transparent = paint_graphics::(source, index).is_none_or(|graphic_list| { + graphic_list.attribute_cloned_or::(core_types::list::ATTR_WEIGHT, 0, 0.) <= 0. || graphic_list.element(0).is_none_or(|graphic| graphic.is_guaranteed_fully_transparent()) + }); opacity > 1. - f64::EPSILON && fill_opaque_or_absent && stroke_invisible_or_transparent })