Enum graphics::draw_state::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

impl PartialOrd<BlendPreset> for BlendPreset

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

impl Eq for BlendPreset

impl Hash for BlendPreset

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

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

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