[−][src]Trait amethyst_rendy::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>(&self, other: &Self, f: F) -> Self where
F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar,
F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar,
Perform a binary operation on this and an other color.
fn component_wise_self<F>(&self, f: F) -> Self where
F: FnMut(Self::Scalar) -> Self::Scalar,
F: FnMut(Self::Scalar) -> Self::Scalar,
Perform a unary operation on this color.
Implementors
impl<C, T> ComponentWise for PreAlpha<C, T> where
C: ComponentWise<Scalar = T>,
T: Float,
[src]
C: ComponentWise<Scalar = T>,
T: Float,
type Scalar = T
fn component_wise<F>(&self, other: &PreAlpha<C, T>, f: F) -> PreAlpha<C, T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> PreAlpha<C, T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,
impl<C, T> ComponentWise for Alpha<C, T> where
C: ComponentWise<Scalar = T>,
T: Clone,
[src]
C: ComponentWise<Scalar = T>,
T: Clone,
type Scalar = T
fn component_wise<F>(&self, other: &Alpha<C, T>, f: F) -> Alpha<C, T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> Alpha<C, T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,
impl<S, T> ComponentWise for Luma<S, T> where
S: LumaStandard,
T: Component,
[src]
S: LumaStandard,
T: Component,
type Scalar = T
fn component_wise<F>(&self, other: &Luma<S, T>, f: F) -> Luma<S, T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> Luma<S, T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,
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>(&self, other: &Rgb<S, T>, f: F) -> Rgb<S, T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> Rgb<S, T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,
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>(&self, other: &Lab<Wp, T>, f: F) -> Lab<Wp, T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> Lab<Wp, T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,
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>(&self, other: &Xyz<Wp, T>, f: F) -> Xyz<Wp, T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> Xyz<Wp, T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,
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>(&self, other: &Yxy<Wp, T>, f: F) -> Yxy<Wp, T> where
F: FnMut(T, T) -> T,
[src]
F: FnMut(T, T) -> T,
fn component_wise_self<F>(&self, f: F) -> Yxy<Wp, T> where
F: FnMut(T) -> T,
[src]
F: FnMut(T) -> T,