Struct palette::blend::Equations [] [src]

pub struct Equations {
    pub color_equation: Equation,
    pub alpha_equation: Equation,
    pub color_parameters: Parameters,
    pub alpha_parameters: Parameters,
}

A pair of blending equations and corresponding parameters.

The Equations type is similar to how blending works in OpenGL, where a blend function has can be written as e(sp * S, dp * D). e is the equation (like s + d), sp and dp are the source and destination parameters, and S and D are the source and destination colors.

Fields

color_equation: Equation

The equation for the color components.

alpha_equation: Equation

The equation for the alpha component.

color_parameters: Parameters

The parameters for the color components.

alpha_parameters: Parameters

The parameters for the alpha component.

Methods

impl Equations
[src]

fn from_equations(color: Equation, alpha: Equation) -> Equations

Create a pair of blending equations, where all the parameters are One.

fn from_parameters(source: Parameter, destination: Parameter) -> Equations

Create a pair of additive blending equations with the provided parameters.

Trait Implementations

impl Debug for Equations
[src]

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

Formats the value using the given formatter.

impl Eq for Equations
[src]

impl PartialEq for Equations
[src]

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

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

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

This method tests for !=.

impl Copy for Equations
[src]

impl Clone for Equations
[src]

fn clone(&self) -> Equations

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<C: Blend<Color=C> + ComponentWise + Clone> BlendFunction<C> for Equations
[src]

fn apply_to(self, source: PreAlpha<C, C::Scalar>, destination: PreAlpha<C, C::Scalar>) -> PreAlpha<C, C::Scalar>

Apply this blend function to a pair of colors.