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§
source§impl Equations
impl Equations
sourcepub fn from_equations(color: Equation, alpha: Equation) -> Equations
pub fn from_equations(color: Equation, alpha: Equation) -> Equations
Create a pair of blending equations, where all the parameters are
One
.
sourcepub fn from_parameters(source: Parameter, destination: Parameter) -> Equations
pub fn from_parameters(source: Parameter, destination: Parameter) -> Equations
Create a pair of additive blending equations with the provided parameters.
Trait Implementations§
source§impl<C: Blend<Color = C> + ComponentWise + Clone> BlendFunction<C> for Equations
impl<C: Blend<Color = C> + ComponentWise + Clone> BlendFunction<C> for Equations
source§impl PartialEq for Equations
impl PartialEq for Equations
impl Copy for Equations
impl Eq for Equations
impl StructuralEq for Equations
impl StructuralPartialEq for Equations
Auto Trait Implementations§
impl RefUnwindSafe for Equations
impl Send for Equations
impl Sync for Equations
impl Unpin for Equations
impl UnwindSafe for Equations
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
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