pub fn apply_opacity(pixel: u32, opacity: u8) -> u32Expand description
Apply a per-surface opacity to a u32 pixel (XRGB8888 -> ARGB8888).
Multiplies the existing alpha channel by opacity / 255.
pub fn apply_opacity(pixel: u32, opacity: u8) -> u32Apply a per-surface opacity to a u32 pixel (XRGB8888 -> ARGB8888).
Multiplies the existing alpha channel by opacity / 255.