Struct nannou::color::blend::Equations [−][src]
pub struct Equations { pub color_equation: Equation, pub alpha_equation: Equation, pub color_parameters: Parameters, pub alpha_parameters: Parameters, }
Expand description
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.
Implementations
Create a pair of blending equations, where all the parameters are
One
.
Create a pair of additive blending equations with the provided parameters.
Trait Implementations
impl<C> BlendFunction<C> for Equations where
C: Blend<Color = C> + ComponentWise + Clone,
<C as ComponentWise>::Scalar: Float,
impl<C> BlendFunction<C> for Equations where
C: Blend<Color = C> + ComponentWise + Clone,
<C as ComponentWise>::Scalar: Float,
pub fn apply_to(
self,
source: PreAlpha<C, <C as ComponentWise>::Scalar>,
destination: PreAlpha<C, <C as ComponentWise>::Scalar>
) -> PreAlpha<C, <C as ComponentWise>::Scalar>
pub fn apply_to(
self,
source: PreAlpha<C, <C as ComponentWise>::Scalar>,
destination: PreAlpha<C, <C as ComponentWise>::Scalar>
) -> PreAlpha<C, <C as ComponentWise>::Scalar>
Apply this blend function to a pair of colors.
Auto Trait Implementations
impl RefUnwindSafe for Equations
impl UnwindSafe for Equations
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V