Enum tetra::graphics::BlendMode [−][src]
The different ways of blending colors.
The active blend mode will be used to determine how drawn content will be blended
with the screen (or with a Canvas
, if one is active).
For modes where the alpha component of the color can affect the output, an
additional BlendAlphaMode
parameter is provided, which determines if
the colour should be multiplied by its alpha before blending.
Variants
Alpha(BlendAlphaMode)
The alpha of the drawn content will determine its opacity.
This is the default behaviour.
Add(BlendAlphaMode)
The pixel colors of the drawn content will be added to the pixel colors already in the target. The target’s alpha will not be affected.
Subtract(BlendAlphaMode)
The pixel colors of the drawn content will be subtracted from the pixel colors already in the target. The target’s alpha will not be affected.
The pixel colors of the drawn content will be multiplied with the pixel colors already in the target. The alpha component will also be multiplied.
Trait Implementations
impl Clone for BlendMode
[src]
impl Copy for BlendMode
[src]
impl Debug for BlendMode
[src]
impl Default for BlendMode
[src]
impl Eq for BlendMode
[src]
impl PartialEq<BlendMode> for BlendMode
[src]
impl StructuralEq for BlendMode
[src]
impl StructuralPartialEq for BlendMode
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,