Trait nannou::color::encoding::pixel::RawPixel[][src]

pub unsafe trait RawPixel<T> {
    pub fn channels(&self) -> usize;
pub unsafe fn from_raw_parts<'a>(
        pointer: *const T,
        length: usize
    ) -> &'a Self;
pub unsafe fn from_raw_parts_mut<'a>(
        pointer: *mut T,
        length: usize
    ) -> &'a mut Self;
pub fn as_ptr(&self) -> *const T;
pub fn as_mut_ptr(&mut self) -> *mut T; }

A contiguous sequence of pixel channels.

It’s used when converting to and from raw pixel data and should only be implemented for types with a suitable in-memory representation.

Required methods

pub fn channels(&self) -> usize[src]

The length of the sequence.

pub unsafe fn from_raw_parts<'a>(pointer: *const T, length: usize) -> &'a Self[src]

Convert from a pointer and a length.

pub unsafe fn from_raw_parts_mut<'a>(
    pointer: *mut T,
    length: usize
) -> &'a mut Self
[src]

Convert from a mutable pointer and a length.

pub fn as_ptr(&self) -> *const T[src]

Convert to a pointer.

pub fn as_mut_ptr(&mut self) -> *mut T[src]

Convert to a mutable pointer.

Loading content...

Implementations on Foreign Types

impl<T> RawPixel<T> for [T][src]

Loading content...

Implementors

impl<P, T> RawPixel<T> for P where
    P: RawPixelSized<T>, 
[src]

Loading content...