Trait rin::color::Color[][src]

pub trait Color<T>: Copy {
    pub fn clamp_s(self, lo: T, hi: T) -> Self;
pub fn clamp_c(self, lo: Self, hi: Self) -> Self;
pub fn inverse(self) -> Self;
pub fn mix(self, other: Self, value: T) -> Self; }

Required methods

pub fn clamp_s(self, lo: T, hi: T) -> Self[src]

pub fn clamp_c(self, lo: Self, hi: Self) -> Self[src]

pub fn inverse(self) -> Self[src]

pub fn mix(self, other: Self, value: T) -> Self[src]

Loading content...

Implementors

impl<T, C> Color<T> for AlphaColor<T, C> where
    C: Color<T>,
    T: Channel
[src]

pub fn clamp_s(self, lo: T, hi: T) -> AlphaColor<T, C>[src]

Clamps the components of the color to the range (lo,hi).

pub fn clamp_c(
    self,
    lo: AlphaColor<T, C>,
    hi: AlphaColor<T, C>
) -> AlphaColor<T, C>
[src]

Clamps the components of the color component-wise between lo and hi.

pub fn inverse(self) -> AlphaColor<T, C>[src]

Inverts the color.

impl<T, S> Color<T> for Hsv<T, S> where
    T: Channel + NumCast + Num,
    S: TransferFunction
[src]

pub fn clamp_s(self, lo: T, hi: T) -> Hsv<T, S>[src]

Clamps the components of the color to the range (lo,hi).

pub fn clamp_c(self, lo: Hsv<T, S>, hi: Hsv<T, S>) -> Hsv<T, S>[src]

Clamps the components of the color component-wise between lo and hi.

pub fn inverse(self) -> Hsv<T, S>[src]

Inverts the color.

impl<T, S> Color<T> for Luma<T, S> where
    T: Channel
[src]

pub fn clamp_s(self, lo: T, hi: T) -> Luma<T, S>[src]

Clamps the components of the color to the range (lo,hi).

pub fn clamp_c(self, lo: Luma<T, S>, hi: Luma<T, S>) -> Luma<T, S>[src]

Clamps the components of the color component-wise between lo and hi.

pub fn inverse(self) -> Luma<T, S>[src]

Inverts the color.

impl<T, S> Color<T> for Rgb<T, S> where
    T: Channel
[src]

pub fn clamp_s(self, lo: T, hi: T) -> Rgb<T, S>[src]

Clamps the components of the color to the range (lo,hi).

pub fn clamp_c(self, lo: Rgb<T, S>, hi: Rgb<T, S>) -> Rgb<T, S>[src]

Clamps the components of the color component-wise between lo and hi.

pub fn inverse(self) -> Rgb<T, S>[src]

Inverts the color.

Loading content...