Function soft_shadow
pub fn soft_shadow(
scene: &mut Scene,
transform: Affine,
rect: Rect,
color: AlphaColor<Srgb>,
spread: f64,
offset_y: f64,
intensity: f32,
)Expand description
Paint a soft drop shadow for rect.
color’s own alpha is ignored — pass the opaque hue; useintensityfor strength.spreadextends the soft falloff this many logical px past every edge.offset_yshifts the shadow downward (ambient light from above).intensityin0.0..=1.0scales the whole shadow’s opacity.
9-sliced around the rect: corners get a fixed spread × spread
circular sprite, edges stretch the 1-D profile along their own
length. No-op for a degenerate rect, spread <= 0, or intensity <= 0.