pub enum BlendMode {
None,
Blend,
Add,
}
Expand description
How drawn pixels are blended with the previously drawn pixels.
Variants§
None
All channels are replaced with the color being drawn, including alpha.
Blend
dstRGB = (srcRGB * srcA) + (dstRGB * (1 - srcA))
dstA = srcA + (dstA * (1 - srcA))
Where dst
is the color of the framebuffer, and src
is the color
being drawn on it.
Add
dstRGB = (srcRGB * srcA) + dstRGB
dstA = dstA
Where dst
is the color of the framebuffer, and src
is the color
being drawn on it.
Trait Implementations§
Source§impl Ord for BlendMode
impl Ord for BlendMode
Source§impl PartialOrd for BlendMode
impl PartialOrd for BlendMode
impl Copy for BlendMode
impl Eq for BlendMode
impl StructuralPartialEq 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
Mutably borrows from an owned value. Read more