Skip to main content

draw

Function draw 

Source
pub fn draw(
    render: &RenderState,
    ctx: &Context,
    shapes: Vec<ClippedShape>,
    pixels_per_point: f32,
    size_px: [u32; 2],
    clear: [f32; 4],
) -> Drawn
Expand description

Draw shapes into an offscreen texture of size_px over clear, and copy it into a buffer the CPU can map: Drawn::wait (native) or Drawn::on_ready (any target) delivers the picture.