pub enum BlendMode {
Show 15 variants
Zero = 0,
One = 1,
SrcColor = 768,
OneMinusSrcColor = 769,
SrcAlpha = 770,
OneMinusSrcAlpha = 771,
DstAlpha = 772,
OneMinusDstAlpha = 773,
DstColor = 774,
OneMinusDstColor = 775,
SrcAlphaSaturate = 776,
ConstantColor = 32_769,
OneMinusConstantColor = 32_770,
ConstantAlpha = 32_771,
OneMinusConstantAlpha = 32_772,
}
Expand description
Constants passed to WebGLRenderingContext.blendFunc() or WebGLRenderingContext.blendFuncSeparate() to specify the blending mode (for both, RBG and alpha, or separately).
Variants§
Zero = 0
Passed to blendFunc or blendFuncSeparate to turn off a component.
One = 1
Passed to blendFunc or blendFuncSeparate to turn on a component.
SrcColor = 768
Passed to blendFunc or blendFuncSeparate to multiply a component by the source elements color.
OneMinusSrcColor = 769
Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source elements color.
SrcAlpha = 770
Passed to blendFunc or blendFuncSeparate to multiply a component by the source’s alpha.
OneMinusSrcAlpha = 771
Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source’s alpha.
DstAlpha = 772
Passed to blendFunc or blendFuncSeparate to multiply a component by the destination’s alpha.
OneMinusDstAlpha = 773
Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination’s alpha.
DstColor = 774
Passed to blendFunc or blendFuncSeparate to multiply a component by the destination’s color.
OneMinusDstColor = 775
Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination’s color.
SrcAlphaSaturate = 776
Passed to blendFunc or blendFuncSeparate to multiply a component by the minimum of source’s alpha or one minus the destination’s alpha.
ConstantColor = 32_769
Passed to blendFunc or blendFuncSeparate to specify a constant color blend function.
OneMinusConstantColor = 32_770
Passed to blendFunc or blendFuncSeparate to specify one minus a constant color blend function.
ConstantAlpha = 32_771
Passed to blendFunc or blendFuncSeparate to specify a constant alpha blend function.
OneMinusConstantAlpha = 32_772
Passed to blendFunc or blendFuncSeparate to specify one minus a constant alpha blend function.
Trait Implementations§
Source§impl FromWasmAbi for BlendMode
impl FromWasmAbi for BlendMode
Source§impl IntoWasmAbi for BlendMode
impl IntoWasmAbi for BlendMode
Source§impl OptionFromWasmAbi for BlendMode
impl OptionFromWasmAbi for BlendMode
Source§impl OptionIntoWasmAbi for BlendMode
impl OptionIntoWasmAbi for BlendMode
Source§impl TryFromJsValue for BlendMode
impl TryFromJsValue for BlendMode
Source§impl VectorFromWasmAbi for BlendMode
impl VectorFromWasmAbi for BlendMode
Source§impl VectorIntoWasmAbi for BlendMode
impl VectorIntoWasmAbi for BlendMode
impl Copy for BlendMode
Auto Trait Implementations§
impl Freeze for BlendMode
impl RefUnwindSafe for BlendMode
impl Send for BlendMode
impl Sync for BlendMode
impl Unpin for BlendMode
impl UnwindSafe for BlendMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.