[][src]Trait canvas::AsPixel

pub trait AsPixel {
    fn pixel() -> Pixel<Self>;
}

Describes a type which can represent a Pixel.

Required methods

fn pixel() -> Pixel<Self>

Get the pixel struct for this type.

The naive implementation of merely unwraping the result of Pixel::for_type panics on any invalid type. This trait should only be implemented when you know for sure that the type is correct.

Loading content...

Implementations on Foreign Types

impl AsPixel for i8[src]

impl AsPixel for u8[src]

impl AsPixel for i16[src]

impl AsPixel for u16[src]

impl AsPixel for i32[src]

impl AsPixel for u32[src]

impl AsPixel for f32[src]

impl AsPixel for i64[src]

impl AsPixel for u64[src]

impl AsPixel for f64[src]

impl AsPixel for [u8; 3][src]

impl AsPixel for [u8; 4][src]

Loading content...

Implementors

impl AsPixel for MaxAligned[src]

Loading content...