Function draw_layer_masked

Source
fn draw_layer_masked(
    dst: &mut Frame,
    src: &Frame,
    p: Placement,
    mode: BlendMode,
    opacity: f32,
    scaler: Scaler,
    scratch: &mut Frame,
    mask: Option<&[u8]>,
)
Expand description

draw_layer with an optional canvas-sized coverage mask (0..255 per pixel) multiplied into the layer’s alpha. A masked draw always takes the general path, which is where coverage is applied.