#[repr(i32)]
pub enum BlendMode {
None,
Blend,
Add,
Mod,
Mul,
Invalid,
}
Expand description
Blend mode for Canvas
, Texture
or Surface
.
Variants
None
no blending (replace destination with source).
Blend
Alpha blending
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
dstA = srcA + (dstA * (1-srcA))
Add
Additive blending
dstRGB = (srcRGB * srcA) + dstRGB
dstA = dstA (keep original alpha)
Mod
Color modulate
dstRGB = srcRGB * dstRGB
Mul
Color multiply
Invalid
Invalid blending mode (indicates error)
Trait Implementations
impl Copy for BlendMode
impl Eq for BlendMode
impl StructuralEq for BlendMode
impl StructuralPartialEq for BlendMode
Auto Trait Implementations
impl RefUnwindSafe for BlendMode
impl Send for BlendMode
impl Sync for BlendMode
impl Unpin for BlendMode
impl UnwindSafe for BlendMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more