[][src]Trait amethyst_rendy::palette::ComponentWise

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

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>(&self, other: &Self, f: F) -> Self where
    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

Perform a unary operation on this color.

Loading content...

Implementors

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

type Scalar = T

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

type Scalar = T

impl<S, T> ComponentWise for Luma<S, T> where
    S: LumaStandard,
    T: Component
[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...