[−][src]Trait palette::ComponentWise
Perform a unary or binary operation on each component of a color.
Associated Types
type Scalar
The scalar type for color components.
Required methods
fn component_wise<F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar>(
&self,
other: &Self,
f: F
) -> Self
&self,
other: &Self,
f: F
) -> Self
Perform a binary operation on this and an other color.
fn component_wise_self<F: FnMut(Self::Scalar) -> Self::Scalar>(
&self,
f: F
) -> Self
&self,
f: F
) -> Self
Perform a unary operation on this color.
Implementors
impl<C: ComponentWise<Scalar = T>, T: Float> ComponentWise for PreAlpha<C, T>
[src]
type Scalar = T
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &PreAlpha<C, T>,
f: F
) -> PreAlpha<C, T>
[src]
&self,
other: &PreAlpha<C, T>,
f: F
) -> PreAlpha<C, T>
fn component_wise_self<F: FnMut(T) -> T>(&self, f: F) -> PreAlpha<C, T>
[src]
impl<C: ComponentWise<Scalar = T>, T: Clone> ComponentWise for Alpha<C, T>
[src]
type Scalar = T
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &Alpha<C, T>,
f: F
) -> Alpha<C, T>
[src]
&self,
other: &Alpha<C, T>,
f: F
) -> Alpha<C, T>
fn component_wise_self<F: FnMut(T) -> T>(&self, f: F) -> Alpha<C, T>
[src]
impl<S, T> ComponentWise for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
T: Component,
S: LumaStandard,
type Scalar = T
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &Luma<S, T>,
f: F
) -> Luma<S, T>
[src]
&self,
other: &Luma<S, T>,
f: F
) -> Luma<S, T>
fn component_wise_self<F: FnMut(T) -> T>(&self, f: F) -> Luma<S, T>
[src]
impl<S, T> ComponentWise for Rgb<S, T> where
S: RgbStandard,
T: Component,
[src]
S: RgbStandard,
T: Component,
type Scalar = T
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &Rgb<S, T>,
f: F
) -> Rgb<S, T>
[src]
&self,
other: &Rgb<S, T>,
f: F
) -> Rgb<S, T>
fn component_wise_self<F: FnMut(T) -> T>(&self, f: F) -> Rgb<S, T>
[src]
impl<Wp, T> ComponentWise for Lab<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
[src]
T: Component + Float,
Wp: WhitePoint,
type Scalar = T
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &Lab<Wp, T>,
f: F
) -> Lab<Wp, T>
[src]
&self,
other: &Lab<Wp, T>,
f: F
) -> Lab<Wp, T>
fn component_wise_self<F: FnMut(T) -> T>(&self, f: F) -> Lab<Wp, T>
[src]
impl<Wp, T> ComponentWise for Xyz<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
[src]
T: Component + Float,
Wp: WhitePoint,
type Scalar = T
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &Xyz<Wp, T>,
f: F
) -> Xyz<Wp, T>
[src]
&self,
other: &Xyz<Wp, T>,
f: F
) -> Xyz<Wp, T>
fn component_wise_self<F: FnMut(T) -> T>(&self, f: F) -> Xyz<Wp, T>
[src]
impl<Wp, T> ComponentWise for Yxy<Wp, T> where
T: Component + Float,
Wp: WhitePoint,
[src]
T: Component + Float,
Wp: WhitePoint,
type Scalar = T
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &Yxy<Wp, T>,
f: F
) -> Yxy<Wp, T>
[src]
&self,
other: &Yxy<Wp, T>,
f: F
) -> Yxy<Wp, T>