Struct image::Rgba[][src]

#[repr(C)]
pub struct Rgba<T: Primitive> { pub data: [T; 4], }

RGB colors + alpha channel

Fields

Trait Implementations

impl<T: PartialEq + Primitive> PartialEq for Rgba<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq + Primitive> Eq for Rgba<T>
[src]

impl<T: Clone + Primitive> Clone for Rgba<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug + Primitive> Debug for Rgba<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Copy + Primitive> Copy for Rgba<T>
[src]

impl<T: Hash + Primitive> Hash for Rgba<T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Primitive + 'static> Pixel for Rgba<T>
[src]

The underlying subpixel type.

Returns the number of channels of this pixel type.

Returns a string that can help to interpret the meaning each channel See gimp babl. Read more

Returns the ColorType for this pixel format

Important traits for &'a [u8]

Returns the components as a slice.

Important traits for &'a [u8]

Returns the components as a mutable slice

Returns the channels of this pixel as a 4 tuple. If the pixel has less than 4 channels the remainder is filled with the maximum value Read more

Construct a pixel from the 4 channels a, b, c and d. If the pixel does not contain 4 channels the extra are ignored. Read more

Returns a view into a slice. Read more

Returns mutable view into a mutable slice. Read more

Convert this pixel to RGB

Convert this pixel to BGR

Convert this pixel to RGB with an alpha channel

Convert this pixel to BGR with an alpha channel

Convert this pixel to luma

Convert this pixel to luma with an alpha channel

Apply the function f to each channel of this pixel.

Apply the function f to each channel of this pixel.

Apply the function f to each channel except the alpha channel. Apply the function g to the alpha channel. Read more

Apply the function f to each channel except the alpha channel. Apply the function g to the alpha channel. Works in-place. Read more

Apply the function f to each channel of this pixel and other pairwise. Read more

Apply the function f to each channel of this pixel and other pairwise. Works in-place. Read more

Invert this pixel

Blend the color of a given pixel into ourself, taking into account alpha channels

impl<T: Primitive> Index<usize> for Rgba<T>
[src]

The returned type after indexing.

Important traits for &'a mut R

Performs the indexing (container[index]) operation.

impl<T: Primitive> IndexMut<usize> for Rgba<T>
[src]

Important traits for &'a mut R

Performs the mutable indexing (container[index]) operation.

Auto Trait Implementations

impl<T> Send for Rgba<T> where
    T: Send

impl<T> Sync for Rgba<T> where
    T: Sync