Skip to main content

paint_image_cover

Function paint_image_cover 

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

Paint img into rect with a cover fit (fill the rect, preserve aspect, crop the overflow) clipped to a rounded rectangle, matching the shape a procedural placeholder occupied.