Function push_box_shadow_scaled

Source
pub fn push_box_shadow_scaled(
    out: &mut Vec<BoxShadowVertex>,
    w: f32,
    h: f32,
    scale: Scale,
    shadow: DrawBoxShadow,
)
Expand description

Appends a paint-only outer box-shadow SDF quad.

Inset shadows, transparent colors, and nonpositive paint/shape bounds append nothing. Radius includes spread, is scaled to physical pixels, and is capped at half the smaller shape axis; blur is clamped nonnegative.

ยงExamples

use ailloli_ui_core::math::Scale;
use ailloli_ui_render_wgpu::passes::push_box_shadow_scaled;
use ailloli_ui_runtime::DrawBoxShadow;
fn build(shadow: DrawBoxShadow) { let mut out = Vec::new(); push_box_shadow_scaled(&mut out, 100.0, 100.0, Scale::new(1.0), shadow); assert!(out.is_empty() || out.len() == 6); }