Render a shadow behind a rectangle.
Call this BEFORE rendering the box content to ensure the shadow appears behind the box.
The shadow is drawn to the right and below the box, creating a drop shadow effect.
Drawlist builder
The rectangle to cast shadow from
Shadow configuration
Base style to get background color from
// Render shadow firstrenderShadow(builder, { x: 5, y: 2, w: 20, h: 10 }, DEFAULT_SHADOW, baseStyle);// Then render the box on toprenderBoxBorder(builder, rect, "rounded", ...); Copy
// Render shadow firstrenderShadow(builder, { x: 5, y: 2, w: 20, h: 10 }, DEFAULT_SHADOW, baseStyle);// Then render the box on toprenderBoxBorder(builder, rect, "rounded", ...);
Render a shadow behind a rectangle.
Call this BEFORE rendering the box content to ensure the shadow appears behind the box.
The shadow is drawn to the right and below the box, creating a drop shadow effect.