Function composite_rect

Source
pub fn composite_rect(
    dst: &mut Frame,
    layer: &Frame,
    mode: BlendMode,
    opacity: f32,
    x0: u32,
    y0: u32,
    x1: u32,
    y1: u32,
)
Expand description

Composite layer (straight-alpha RGBA, same size as dst) onto dst (opaque canvas) with the given blend mode and global opacity, restricted to the pixel rect [x0, x1) × [y0, y1) (clamped to the canvas). Pixels with alpha 0 are skipped.