[][src]Struct pix::RgbModel

pub struct RgbModel {}

RGB additive color model.

The components are red, green and blue, with optional alpha.

Methods

impl RgbModel[src]

pub fn red<P: Pixel>(p: P) -> P::Chan where
    P: Pixel<Model = Self>, 
[src]

Get the red component.

pub fn green<P: Pixel>(p: P) -> P::Chan where
    P: Pixel<Model = Self>, 
[src]

Get the green component.

pub fn blue<P: Pixel>(p: P) -> P::Chan where
    P: Pixel<Model = Self>, 
[src]

Get the blue component.

pub fn difference<P: Pixel>(p: P, rhs: P) -> P where
    P: Pixel<Model = Self>, 
[src]

Get channel-wise difference

pub fn within_threshold<P: Pixel>(p: P, rhs: P) -> bool where
    P: Pixel<Model = Self>, 
[src]

Check if all Channels are within threshold

Trait Implementations

impl Clone for RgbModel[src]

impl ColorModel for RgbModel[src]

fn alpha<P: Pixel>(p: P) -> P::Chan where
    P: Pixel<Model = Self>, 
[src]

Get the alpha component.

fn into_channels<S, D>(src: S) -> Channels<S::Chan> where
    S: Pixel<Model = Self>,
    D: Pixel
[src]

Convert into channels shared by pixel types

fn into_rgba<P>(p: P) -> [P::Chan; 4] where
    P: Pixel<Model = Self>, 
[src]

Convert into red, green, blue and alpha components

fn from_channels<S: Pixel, D: Pixel>(channels: Channels<D::Chan>) -> D[src]

Convert from channels shared by pixel types

fn from_rgba<P: Pixel>(rgba: [P::Chan; 4]) -> P[src]

Convert from red, green, blue and alpha components

impl Copy for RgbModel[src]

impl Debug for RgbModel[src]

impl Default for RgbModel[src]

impl PartialEq<RgbModel> for RgbModel[src]

impl StructuralPartialEq for RgbModel[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.