#[repr(i32)]pub enum WGPUCompositeAlphaMode {
Auto = 0,
Opaque = 1,
Premultiplied = 2,
Unpremultiplied = 3,
Inherit = 4,
}Variants§
Auto = 0
Lets the WebGPU implementation choose the best mode (supported, and with the best performance) between @ref WGPUCompositeAlphaMode_Opaque or @ref WGPUCompositeAlphaMode_Inherit.
Opaque = 1
The alpha component of the image is ignored and teated as if it is always 1.0.
Premultiplied = 2
The alpha component is respected and non-alpha components are assumed to be already multiplied with the alpha component. For example, (0.5, 0, 0, 0.5) is semi-transparent bright red.
Unpremultiplied = 3
The alpha component is respected and non-alpha components are assumed to NOT be already multiplied with the alpha component. For example, (1.0, 0, 0, 0.5) is semi-transparent bright red.
Inherit = 4
The handling of the alpha component is unknown to WebGPU and should be handled by the application using system-specific APIs. This mode may be unavailable (for example on Wasm).
Implementations§
Trait Implementations§
Source§impl Clone for WGPUCompositeAlphaMode
impl Clone for WGPUCompositeAlphaMode
Source§fn clone(&self) -> WGPUCompositeAlphaMode
fn clone(&self) -> WGPUCompositeAlphaMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more