Skip to main content

draw

Function draw 

pub fn draw(
    scene: &mut Scene,
    theme: &Theme,
    transform: Affine,
    bounds: Rect,
    elapsed_seconds: f64,
)
Expand description

Paint an opaque authentication backdrop inside bounds.

bounds is in the coordinate space of transform, the same transform the caller’s widgets draw with: a toolkit host hands widgets a scene in physical pixels with the device scale in transform, so a backdrop drawn without it would cover only the logical-sized corner of a scaled output. The elapsed time is supplied by the host, making stills and recordings deterministic. Invalid or negative times use the initial composition; long uptimes wrap before trigonometry. Empty or non-finite bounds draw nothing. The base is always opaque, even for a custom theme with translucent tokens.