[][src]Struct pix::Srgb

#[repr(C)]
pub struct Srgb<C: Channel, A: Alpha> { /* fields omitted */ }

sRGB pixel Format.

The channels are red, green and blue. They are gamma-encoded.

Methods

impl<C: Channel, A: Alpha> Srgb<C, A>[src]

pub fn new<V>(red: V, green: V, blue: V) -> Self where
    C: From<V>, 
[src]

Build a color by specifying red, green and blue values.

pub fn red(self) -> C[src]

Get the red channel value.

pub fn green(self) -> C[src]

Get the green channel value.

pub fn blue(self) -> C[src]

Get the blue channel value.

pub fn alpha(self) -> A[src]

Get the alpha channel value.

Trait Implementations

impl<C: Channel, A: Alpha> Format for Srgb<C, A>[src]

type Chan = C

Channel type

impl<C, H, A, B> From<Rgb<H, B>> for Srgb<C, A> where
    C: Channel,
    C: From<H>,
    H: Channel,
    A: Alpha<Chan = C>,
    A: From<B>,
    B: Alpha
[src]

fn from(c: Rgb<H, B>) -> Self[src]

Get an Srgb from an Rgb

impl<C, H, A, B> From<Srgb<H, B>> for Rgb<C, A> where
    C: Channel,
    C: From<H>,
    H: Channel,
    A: Alpha,
    A: From<B>,
    B: Alpha
[src]

fn from(srgb: Srgb<H, B>) -> Self[src]

Get an Rgb from an Srgb

impl<C: Default + Channel, A: Default + Alpha> Default for Srgb<C, A>[src]

impl<C: Copy + Channel, A: Copy + Alpha> Copy for Srgb<C, A>[src]

impl<C: Clone + Channel, A: Clone + Alpha> Clone for Srgb<C, A>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<C: PartialEq + Channel, A: PartialEq + Alpha> PartialEq<Srgb<C, A>> for Srgb<C, A>[src]

impl<C: Debug + Channel, A: Debug + Alpha> Debug for Srgb<C, A>[src]

Auto Trait Implementations

impl<C, A> Send for Srgb<C, A> where
    A: Send,
    C: Send

impl<C, A> Sync for Srgb<C, A> where
    A: Sync,
    C: Sync

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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