pub trait BitmapData {
    // Required methods
    fn iter(&self) -> Iter<'_, Pixel>;
    fn width(&self) -> u32;
    fn height(&self) -> u32;
    fn get(&self, x: u32, y: u32) -> Pixel;
    fn slice(&self, x: u32, width: u32, y: u32) -> &[Pixel];
}
Expand description

Trait for bitmap data

Required Methods§

source

fn iter(&self) -> Iter<'_, Pixel>

Iterate over pixels

source

fn width(&self) -> u32

Bitmap width

source

fn height(&self) -> u32

Bitmap height

source

fn get(&self, x: u32, y: u32) -> Pixel

Get a single pixel

source

fn slice(&self, x: u32, width: u32, y: u32) -> &[Pixel]

get a many pixels

Implementors§