[][src]Trait ffimage::packed::traits::AccessPixel

pub trait AccessPixel {
    type PixelType: Pixel;
    fn pixel_row(&self, y: u32) -> Option<&[Self::PixelType]>;

    fn pixel(&self, x: u32, y: u32) -> Option<&Self::PixelType> { ... }
}

Access pixel (read-only)

This trait guarantees efficient pixel access in a way that the backing pixel storage is already allocated. Packed images allow for reinterpreting raw but coherent memory as a set of pixels.

Associated Types

Loading content...

Required methods

fn pixel_row(&self, y: u32) -> Option<&[Self::PixelType]>

Returns the pixel row at the specified y offset

Loading content...

Provided methods

fn pixel(&self, x: u32, y: u32) -> Option<&Self::PixelType>

Returns the pixel at the specified coordinates

Loading content...

Implementors

impl<'a, T: Pixel> AccessPixel for GenericFlatBuffer<'a, T>[src]

type PixelType = T

impl<'a, T: Pixel> AccessPixel for GenericView<'a, T>[src]

type PixelType = T

impl<T: Pixel> AccessPixel for GenericBuffer<T>[src]

type PixelType = T

Loading content...