#[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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more