[][src]Enum fna3d::Blend

#[repr(u32)]pub enum Blend {
    One,
    Zero,
    SourceColor,
    InverseSourceColor,
    SourceAlpha,
    InverseSourceAlpha,
    DestinationColor,
    InveseDestinationColor,
    DestinaitonAlpha,
    InverseDetinationAlpha,
    BlendFactor,
    InverseBlendFactor,
    SourceAlphaSaturation,
}

BlendState component, which specifies blend mode

Variants

One

Each component of the color is multiplied by {1, 1, 1, 1}.

Zero

Each component of the color is multiplied by {0, 0, 0, 0}.

SourceColor

Each component of the color is multiplied by the source color. {Rs, Gs, Bs, As}, where Rs, Gs, Bs, As are color source values.

InverseSourceColor

Each component of the color is multiplied by the inverse of the source color. {1 - Rs, 1 - Gs, 1 - Bs, 1 - As}, where Rs, Gs, Bs, As are color source values.

SourceAlpha

Each component of the color is multiplied by the alpha value of the source. {As, As, As, As}, where As is the source alpha value.

InverseSourceAlpha

Each component of the color is multiplied by the inverse of the alpha value of the source. {1 - As, 1 - As, 1 - As, 1 - As}, where As is the source alpha value.

DestinationColor

Each component color is multiplied by the destination color. {Rd, Gd, Bd, Ad}, where Rd, Gd, Bd, Ad are color destination values.

InveseDestinationColor

Each component of the color is multiplied by the inversed destination color. {1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad}, where Rd, Gd, Bd, Ad are color destination values.

DestinaitonAlpha

Each component of the color is multiplied by the alpha value of the destination. {Ad, Ad, Ad, Ad}, where Ad is the destination alpha value.

InverseDetinationAlpha

Each component of the color is multiplied by the inversed alpha value of the destination. {1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad}, where Ad is the destination alpha value.

BlendFactor

Each component of the color is multiplied by a constant in the .

InverseBlendFactor

Each component of the color is multiplied by a inversed constant in the .

SourceAlphaSaturation

Each component of the color is multiplied by either the alpha of the source color, or the inverse of the alpha of the source color, whichever is greater. {f, f, f, 1}, where f = min(As, 1 - As), where As is the source alpha value.

Trait Implementations

impl Clone for Blend[src]

impl Copy for Blend[src]

impl Debug for Blend[src]

impl Eq for Blend[src]

impl FromPrimitive for Blend[src]

impl Hash for Blend[src]

impl PartialEq<Blend> for Blend[src]

impl StructuralEq for Blend[src]

impl StructuralPartialEq for Blend[src]

impl ToPrimitive for Blend[src]

impl TryFrom<i16> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<i32> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<i64> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<i8> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<u16> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<u32> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<u64> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl TryFrom<u8> for Blend[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Blend

impl Send for Blend

impl Sync for Blend

impl Unpin for Blend

impl UnwindSafe for Blend

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.