Skip to main content

draw_strip

Function draw_strip 

pub fn draw_strip(
    scene: &mut Scene,
    transform: Affine,
    viewport: Rect,
    scroll: Vec2,
    draw: impl FnOnce(&mut Scene),
) -> bool
Expand description

Draw a pannable view’s content as the frame’s strip, when a LayerRecording is open: viewport (where the content shows) and scroll (how far it is panned, transform mapping both to device pixels) are whole device pixels, nothing is open around the view in scene, and no other view is the frame’s strip. draw then draws the content where it would show with no pan, scroll right of and below where it shows: the strip’s canvas. Returns false, having drawn nothing, otherwise: the caller draws its content as usual.