Trait rgb::FromSlice[][src]

pub trait FromSlice<T: Copy> {
Show methods fn as_rgb(&self) -> &[RGB<T>];
fn as_rgba(&self) -> &[RGBA<T>];
fn as_argb(&self) -> &[ARGB<T>];
fn as_rgb_mut(&mut self) -> &mut [RGB<T>];
fn as_rgba_mut(&mut self) -> &mut [RGBA<T>];
fn as_argb_mut(&mut self) -> &mut [ARGB<T>];
fn as_gray(&self) -> &[Gray<T>];
fn as_gray_alpha(&self) -> &[GrayAlpha<T>];
fn as_gray_mut(&mut self) -> &mut [Gray<T>];
fn as_gray_alpha_mut(&mut self) -> &mut [GrayAlpha<T>];
fn as_bgr(&self) -> &[BGR<T>];
fn as_bgra(&self) -> &[BGRA<T>];
fn as_abgr(&self) -> &[ABGR<T>];
fn as_bgr_mut(&mut self) -> &mut [BGR<T>];
fn as_bgra_mut(&mut self) -> &mut [BGRA<T>];
fn as_abgr_mut(&mut self) -> &mut [ABGR<T>];
}

Cast a slice of component values (bytes) as a slice of RGB/RGBA pixels

If there’s any incomplete pixel at the end of the slice it is ignored.

Required methods

fn as_rgb(&self) -> &[RGB<T>][src]

Reinterpert slice as RGB pixels

fn as_rgba(&self) -> &[RGBA<T>][src]

Reinterpert slice as RGBA pixels

fn as_argb(&self) -> &[ARGB<T>][src]

Reinterpert slice as alpha-first ARGB pixels

fn as_rgb_mut(&mut self) -> &mut [RGB<T>][src]

Reinterpert mutable slice as RGB pixels

fn as_rgba_mut(&mut self) -> &mut [RGBA<T>][src]

Reinterpert mutable slice as RGBA pixels

fn as_argb_mut(&mut self) -> &mut [ARGB<T>][src]

Reinterpert mutable slice as alpha-first ARGB pixels

fn as_gray(&self) -> &[Gray<T>][src]

Reinterpert mutable slice as grayscale pixels

fn as_gray_alpha(&self) -> &[GrayAlpha<T>][src]

Reinterpert mutable slice as grayscale pixels with alpha

fn as_gray_mut(&mut self) -> &mut [Gray<T>][src]

Reinterpert mutable slice as grayscale pixels

fn as_gray_alpha_mut(&mut self) -> &mut [GrayAlpha<T>][src]

Reinterpert mutable slice as grayscale pixels with alpha

fn as_bgr(&self) -> &[BGR<T>][src]

Reinterpert slice as reverse-order BGR pixels

fn as_bgra(&self) -> &[BGRA<T>][src]

Reinterpert slice as reverse-order BGRA pixels

fn as_abgr(&self) -> &[ABGR<T>][src]

Reinterpert slice as reverse-order ABGR pixels

fn as_bgr_mut(&mut self) -> &mut [BGR<T>][src]

Reinterpert ntable slice as reverse-order BGR pixels

fn as_bgra_mut(&mut self) -> &mut [BGRA<T>][src]

Reinterpert mutable slice as reverse-order alpha-last BGRA pixels

fn as_abgr_mut(&mut self) -> &mut [ABGR<T>][src]

Reinterpert mutable slice as reverse-order alpha-first ABGR pixels

Loading content...

Implementations on Foreign Types

impl<T: Copy> FromSlice<T> for [T][src]

fn as_rgb(&self) -> &[RGB<T>][src]

fn as_rgba(&self) -> &[RGBA<T>][src]

fn as_argb(&self) -> &[ARGB<T>][src]

fn as_rgb_mut(&mut self) -> &mut [RGB<T>][src]

fn as_rgba_mut(&mut self) -> &mut [RGBA<T>][src]

fn as_argb_mut(&mut self) -> &mut [ARGB<T>][src]

fn as_gray(&self) -> &[Gray<T>][src]

fn as_gray_alpha(&self) -> &[GrayAlpha<T>][src]

fn as_gray_mut(&mut self) -> &mut [Gray<T>][src]

fn as_gray_alpha_mut(&mut self) -> &mut [GrayAlpha<T>][src]

fn as_bgr(&self) -> &[BGR<T>][src]

fn as_abgr(&self) -> &[ABGR<T>][src]

fn as_bgra(&self) -> &[BGRA<T>][src]

fn as_bgr_mut(&mut self) -> &mut [BGR<T>][src]

fn as_bgra_mut(&mut self) -> &mut [BGRA<T>][src]

fn as_abgr_mut(&mut self) -> &mut [ABGR<T>][src]

Loading content...

Implementors

Loading content...