Function drop_shadow

Source
pub fn drop_shadow(rect: Rect, radius: f32, shadow: Shadow)
Expand description

Soft shadow under a rounded rectangle. The falloff follows a smoothstep across blur, approximating a Gaussian with four feathered rings. Emits at most 1,836 vertices.

use ferravex_render::{Color, Rect, shapes::{self, Shadow}};
shapes::drop_shadow(Rect::new(20., 20., 200., 90.), 10., Shadow::soft(Color::new(0., 0., 0., 0.5)));