Skip to main content

part

Function part 

pub fn part<R>(
    scene: &mut Scene,
    key: PartKey,
    bounds: Vec<Rect>,
    draw: impl FnOnce(&mut Scene) -> R,
) -> R
Expand description

Draw one part of a section: bounds, in the section’s coordinates (the draw transform already applied), must cover every pixel draw can paint, shadows and antialiasing included. An empty bounds claims draw paints nothing; a part that then draws anything is treated as unbounded.