cosmic::cosmic_theme::palette::blend

Trait 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: Premultiply<Scalar = S> + Mul<Output = C, Output = C> + Mul<S> + ArrayCast<Array = [S; N]> + Clone, PreAlpha<C>: ArrayCast<Array = [S; M]>, S: Real + One + Zero + MinMax + Sqrt + IsValidDivisor + Arithmetics + Clone,