[][src]Trait micro_gui::core::buffer::Buff

pub trait Buff<Pixel> {
    fn set(&mut self, x: usize, y: usize, p: &Pixel);
fn get(&self, x: usize, y: usize) -> Pixel;
fn size(&self) -> (usize, usize);
fn clear(&mut self, p: &Pixel); }

Buff trait encompasses methods required for a graphics buffer

Required methods

fn set(&mut self, x: usize, y: usize, p: &Pixel)

Set trait sets a pixel in the buffer

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

Get trait fetches a pixel in a buffer

fn size(&self) -> (usize, usize)

Size trait fetches the size of a buffer (in pixels)

fn clear(&mut self, p: &Pixel)

Clear clears the buffer

Loading content...

Implementors

impl<'a> Buff<bool> for Buffer<'a, PixelBW>[src]

fn set(&mut self, x: usize, y: usize, p: &PixelBW)[src]

Black and white mode pixel set function

fn get(&self, x: usize, y: usize) -> PixelBW[src]

Black and white mode pixel get function

fn clear(&mut self, p: &PixelBW)[src]

Black and White mode buffer clear function

fn size(&self) -> (usize, usize)[src]

Fetch the buffer size in pixels

impl<'a> Buff<PixelRGB24> for Buffer<'a, PixelRGB24>[src]

fn set(&mut self, x: usize, y: usize, p: &PixelRGB24)[src]

RGB24 mode pixel set function

fn get(&self, x: usize, y: usize) -> PixelRGB24[src]

RGB24 mode pixel get function

fn clear(&mut self, p: &PixelRGB24)[src]

RGB24 mode buffer clear function

fn size(&self) -> (usize, usize)[src]

Fetch the buffer size in pixels

Loading content...