[−][src]Struct pix::Srgb
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]
C: From<V>,
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]
C: Channel,
C: From<H>,
H: Channel,
A: Alpha<Chan = C>,
A: From<B>,
B: Alpha,
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]
C: Channel,
C: From<H>,
H: Channel,
A: Alpha,
A: From<B>,
B: Alpha,
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(&self) -> 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,
A: Send,
C: Send,
impl<C, A> Sync for Srgb<C, A> where
A: Sync,
C: Sync,
A: Sync,
C: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,