Trait palette::blend::BlendFunction

source ·
pub trait BlendFunction<C>
where C: Premultiply,
{ // Required method fn apply_to( self, source: PreAlpha<C>, destination: PreAlpha<C>, ) -> PreAlpha<C>; }
Expand description

A trait for custom blend functions.

Required Methods§

source

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

Apply this blend function to a pair of colors.

Implementors§

source§

impl<C, F> BlendFunction<C> for F
where C: Premultiply, F: FnOnce(PreAlpha<C>, PreAlpha<C>) -> PreAlpha<C>,

source§

impl<C, S, const N: usize, const M: usize> BlendFunction<C> for Equations
where C: Clone + Premultiply<Scalar = S> + Mul<Output = C> + Mul<S, Output = C> + ArrayCast<Array = [S; N]>, PreAlpha<C>: ArrayCast<Array = [S; M]>, S: Real + One + Zero + MinMax + Sqrt + IsValidDivisor + Arithmetics + Clone,