[][src]Trait palette::ComponentWise

pub trait ComponentWise {
    type Scalar;
    fn component_wise<F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar>(
        &self,
        other: &Self,
        f: F
    ) -> Self;
fn component_wise_self<F: FnMut(Self::Scalar) -> Self::Scalar>(
        &self,
        f: F
    ) -> Self; }

Perform a unary or binary operation on each component of a color.

Associated Types

type Scalar

The scalar type for color components.

Loading content...

Required methods

fn component_wise<F: FnMut(Self::Scalar, Self::Scalar) -> Self::Scalar>(
    &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

Perform a unary operation on this color.

Loading content...

Implementors

impl<C: ComponentWise<Scalar = T>, T: Float> ComponentWise for PreAlpha<C, T>[src]

type Scalar = T

impl<C: ComponentWise<Scalar = T>, T: Clone> ComponentWise for Alpha<C, T>[src]

type Scalar = T

impl<S, T> ComponentWise for Luma<S, T> where
    T: Component,
    S: LumaStandard
[src]

type Scalar = T

impl<S, T> ComponentWise for Rgb<S, T> where
    S: RgbStandard,
    T: Component
[src]

type Scalar = T

impl<Wp, T> ComponentWise for Lab<Wp, T> where
    T: Component + Float,
    Wp: WhitePoint
[src]

type Scalar = T

impl<Wp, T> ComponentWise for Xyz<Wp, T> where
    T: Component + Float,
    Wp: WhitePoint
[src]

type Scalar = T

impl<Wp, T> ComponentWise for Yxy<Wp, T> where
    T: Component + Float,
    Wp: WhitePoint
[src]

type Scalar = T

Loading content...