Enum gfx::BlendPreset []

pub enum BlendPreset {
    Add,
    Multiply,
    Alpha,
    Invert,
}

Blend function presets for ease of use.

Variants

Add

When combining two fragments, add their values together, saturating at 1.0

Multiply

When combining two fragments, multiply their values together.

Alpha

When combining two fragments, add the value of the source times its alpha channel with the value of the destination multiplied by the inverse of the source alpha channel. Has the usual transparency effect: mixes the two colors using a fraction of each one specified by the alpha of the source.

Invert

When combining two fragments, subtract the destination color from a constant color using the source color as weight. Has an invert effect with the constant color as base and source color controlling displacement from the base color. A white source color and a white value results in plain invert. The output alpha is same as destination alpha.

Trait Implementations

impl Ord for BlendPreset

fn cmp(&self, __arg_0: &BlendPreset) -> Ordering

This method returns an Ordering between self and other. Read more

impl PartialOrd<BlendPreset> for BlendPreset

fn partial_cmp(&self, __arg_0: &BlendPreset) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, other: &Rhs) -> bool
1.0.0

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, other: &Rhs) -> bool
1.0.0

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Eq for BlendPreset

impl Hash for BlendPreset

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Debug for BlendPreset

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl PartialEq<BlendPreset> for BlendPreset

fn eq(&self, __arg_0: &BlendPreset) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Clone for BlendPreset

fn clone(&self) -> BlendPreset

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for BlendPreset