[−][src]Trait nanachi::buffer::Buffer
A trait for represents an image.
Required methods
pub fn dimensions(&self) -> (u32, u32)
Get (width, height)
.
pub fn get_pixel(&self, x: u32, y: u32) -> &P
Get pixel by x
and y
.
pub fn get_pixel_mut(&mut self, x: u32, y: u32) -> &mut P
Get mut pixel by x
and y
.
pub fn put_pixel(&mut self, x: u32, y: u32, pixel: P)
Put a pixel.