pub trait GetPixel {
    type Color: PixelColor;

    // Required method
    fn pixel(&self, p: Point) -> Option<Self::Color>;
}
Expand description

Pixel getter.

Required Associated Types§

source

type Color: PixelColor

The color type.

Required Methods§

source

fn pixel(&self, p: Point) -> Option<Self::Color>

Gets the color of a pixel.

Returns None if p is outside the bounding box.

Implementors§

source§

impl<'a, C, BO> GetPixel for ImageRaw<'a, C, BO>where C: PixelColor + From<<C as PixelColor>::Raw>, BO: ByteOrder, RawDataSlice<'a, C::Raw, BO>: IntoIterator<Item = C::Raw>,

§

type Color = C

source§

impl<C, BO, const WIDTH: usize, const HEIGHT: usize, const N: usize> GetPixel for Framebuffer<C, C::Raw, BO, WIDTH, HEIGHT, N>where C: PixelColor + From<C::Raw>, BO: ByteOrder, for<'a> RawDataSlice<'a, C::Raw, BO>: IntoIterator<Item = C::Raw>,

§

type Color = C