Trait palette::blend::BlendFunction
[−]
[src]
pub trait BlendFunction<C: Blend<Color=C> + ComponentWise> { fn apply_to(self, source: PreAlpha<C, C::Scalar>, destination: PreAlpha<C, C::Scalar>) -> PreAlpha<C, C::Scalar>; }
A trait for custom blend functions.
Required Methods
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.
Implementors
impl<C: Blend<Color=C> + ComponentWise + Clone> BlendFunction<C> for Equations
impl<C, F> BlendFunction<C> for F where C: Blend<Color=C> + ComponentWise, F: FnOnce(PreAlpha<C, C::Scalar>, PreAlpha<C, C::Scalar>) -> PreAlpha<C, C::Scalar>