Enum gfx::BlendPreset [] [src]

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

Derived Implementations

impl Hash for BlendPreset

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

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

impl Eq for BlendPreset

impl Debug for BlendPreset

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

impl PartialEq<BlendPreset> for BlendPreset

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

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

impl Clone for BlendPreset

fn clone(&self) -> BlendPreset

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

impl Copy for BlendPreset