Skip to main content

paint_part

Function paint_part 

pub fn paint_part(
    scene: &mut Scene,
    transform: Affine,
    rect: Rect,
    _: (&PainterSet, Part, SurfaceRole),
    moment: Moment,
    tokens: &PartTokens,
    theme: &Theme,
) -> Option<Painted>
Expand description

Draw part of set in rect (in the coordinates transform maps into scene’s), at moment of its motion, with tokens. None when the set leaves the part to the toolkit’s own painters, which the caller then draws.

A settled part is drawn once per size, state and tokens and replayed from then on; a moving one is drawn every frame; one that shows the backdrop is drawn every frame into scene itself, which the backdrop pass records it against. Windows, floating chrome and bars may show the backdrop, as their painter says; a control’s backdrop brush is its fallback.