[−][src]Struct pix::Rgba
Linear RGBA pixel format.
The channels are red, green, blue and alpha. They are encoded in linear intensity, with premultiplied alpha.
Methods
impl<C: Channel> Rgba<C>
[src]
pub fn new<V>(red: V, green: V, blue: V, alpha: V) -> Self where
C: From<V>,
[src]
C: From<V>,
Build a color by specifying red, green, blue and alpha values.
pub fn red(self) -> C
[src]
Get the red channel.
pub fn green(self) -> C
[src]
Get the green channel.
pub fn blue(self) -> C
[src]
Get the blue channel.
pub fn alpha(self) -> C
[src]
Get the alpha channel.
Trait Implementations
impl PixFmt for Rgba<Cu8>
[src]
fn mask_over(dst: &mut [Self], mask: &[u8], clr: Self)
[src]
Blend pixels with an alpha mask.
dst
Destination pixels.mask
Alpha mask for compositing.src
Source color.
fn mask_over_fallback(dst: &mut [Self], mask: &[u8], src: Self)
[src]
Blend pixels with an alpha mask (slow fallback).
dst
Destination pixels.mask
Alpha mask for compositing.src
Source color.
fn as_u8_slice(pix: &[Self]) -> &[u8]
[src]
Convert a pixel slice into a u8 slice. Read more
fn as_u8_slice_mut(pix: &mut [Self]) -> &mut [u8]
[src]
Convert a pixel slice into a mutable u8 slice. Read more
fn as_slice(pix: &[u8]) -> &[Self]
[src]
Convert a u8 slice into a pixel slice. Read more
fn as_slice_mut(pix: &mut [u8]) -> &mut [Self]
[src]
Convert a u8 slice into a mutable pixel slice. Read more
impl<C: Channel, H: Channel> From<Rgba<H>> for Rgb<C> where
C: From<H>,
[src]
C: From<H>,
impl<C: Channel> From<Rgba<C>> for i32
[src]
impl<C: Channel, H: Channel> From<Rgb<H>> for Rgba<C> where
C: From<H>,
[src]
C: From<H>,
impl<C: Channel, H: Channel> From<Rgba<H>> for Srgb<C> where
C: From<H>,
[src]
C: From<H>,
impl<C: Copy + Channel> Copy for Rgba<C>
[src]
impl<C: Clone + Channel> Clone for Rgba<C>
[src]
fn clone(&self) -> Rgba<C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<C: PartialEq + Channel> PartialEq<Rgba<C>> for Rgba<C>
[src]
impl<C: Default + Channel> Default for Rgba<C>
[src]
impl<C: Debug + Channel> Debug for Rgba<C>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From 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 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 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 for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,