Enum sdl2_sys::SDL_BlendMode
source · #[repr(u32)]pub enum SDL_BlendMode {
SDL_BLENDMODE_NONE = 0,
SDL_BLENDMODE_BLEND = 1,
SDL_BLENDMODE_ADD = 2,
SDL_BLENDMODE_MOD = 4,
SDL_BLENDMODE_MUL = 8,
SDL_BLENDMODE_INVALID = 2_147_483_647,
}
Expand description
\brief The blend mode used in SDL_RenderCopy() and drawing operations.
Variants§
SDL_BLENDMODE_NONE = 0
< no blending dstRGBA = srcRGBA
SDL_BLENDMODE_BLEND = 1
< alpha blending dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) dstA = srcA + (dstA * (1-srcA))
SDL_BLENDMODE_ADD = 2
< additive blending dstRGB = (srcRGB * srcA) + dstRGB dstA = dstA
SDL_BLENDMODE_MOD = 4
< color modulate dstRGB = srcRGB * dstRGB dstA = dstA
SDL_BLENDMODE_MUL = 8
< color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) dstA = (srcA * dstA) + (dstA * (1-srcA))
SDL_BLENDMODE_INVALID = 2_147_483_647
Trait Implementations§
source§impl Clone for SDL_BlendMode
impl Clone for SDL_BlendMode
source§fn clone(&self) -> SDL_BlendMode
fn clone(&self) -> SDL_BlendMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Hash for SDL_BlendMode
impl Hash for SDL_BlendMode
source§impl PartialEq for SDL_BlendMode
impl PartialEq for SDL_BlendMode
source§fn eq(&self, other: &SDL_BlendMode) -> bool
fn eq(&self, other: &SDL_BlendMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SDL_BlendMode
impl Eq for SDL_BlendMode
impl StructuralPartialEq for SDL_BlendMode
Auto Trait Implementations§
impl Freeze for SDL_BlendMode
impl RefUnwindSafe for SDL_BlendMode
impl Send for SDL_BlendMode
impl Sync for SDL_BlendMode
impl Unpin for SDL_BlendMode
impl UnwindSafe for SDL_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