Enum tetra::graphics::BlendMode[][src]

pub enum BlendMode {
    Alpha(BlendAlphaMode),
    Add(BlendAlphaMode),
    Subtract(BlendAlphaMode),
    Multiply,
}

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

The alpha of the drawn content will determine its opacity.

This is the default behaviour.

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.

Multiply

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.