Skip to main content

paint_image_contain

Function paint_image_contain 

pub fn paint_image_contain(
    scene: &mut Scene,
    transform: Affine,
    rect: Rect,
    img: &ImageData,
    radius: f64,
)
Expand description

Paint img into rect with a contain fit (the whole picture, aspect kept, centred; whatever it leaves shows what is under it), clipped to a rounded rectangle: a shared screen, of which nothing may be cut off.