pub trait BackendImage<'a, P: 'a> {
type Iterator: Iterator<Item = &'a P>;
// Required methods
unsafe fn pixel_unsafe(&self, x: u32, y: u32) -> &P;
fn width(&self) -> u32;
fn height(&self) -> u32;
fn pixels(&'a self) -> Self::Iterator;
}
Expand description
Trait to generalize images to be displayed on the backend.
Currently implemented for Canvas
and Sprite
.