[go: up one dir, main page]

overlay_rgb8

Function overlay_rgb8 

Source
pub fn overlay_rgb8(
    src: &[u8],
    dst: &mut [Vec4],
    rect: &ClippedRect,
    alpha: u8,
) -> Vec<Vec4>
Available on crate feature overlay only.
Expand description

Overlay src onto dst using an alpha value.

  • src is an RGB8 (1 byte per channel) image.
  • dst is an RGBA32 (4 bytes per channel) image.
  • rect is the ClippedRect defining the blit area.
  • alpha is the alpha channel. 0 is totally transparent.

Returns src as an RGBA32 bitmap (see: rgb8_to_rgba32).