⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

render_shadow

Function render_shadow 

Source
pub fn render_shadow(
    shadow_buffer: &mut [u32],
    buf_width: u32,
    width: u32,
    height: u32,
    radius: u32,
    opacity: u8,
)
Expand description

Render a soft box shadow behind a window.

The shadow is drawn into shadow_buffer, which should be pre-allocated with (width + 2 * radius) * (height + 2 * radius) u32 elements. The shadow is centered, so the window content starts at offset (radius, radius) within the shadow buffer.

Uses a 3-pass box blur approximating a Gaussian shadow.

buf_width is the stride of shadow_buffer in pixels.