[−][src]Struct micro_gui::core::buffer::Buffer
Buffer implements a generic display buffer over an arbitrary pixel type
Fields
width: usize
height: usize
porch_bytes: usize
trailer_bytes: usize
line_width_bytes: usize
data: &'a mut [u8]
Methods
impl<'a, Pixel> Buffer<'a, Pixel>
[src]
impl<'a> Buffer<'a, PixelBW>
[src]
pub fn new(
width: usize,
height: usize,
porch_bytes: usize,
trailer_bytes: usize,
data: &'a mut [u8]
) -> Self
[src]
width: usize,
height: usize,
porch_bytes: usize,
trailer_bytes: usize,
data: &'a mut [u8]
) -> Self
impl<'a> Buffer<'a, PixelRGB24>
[src]
pub fn new(
width: usize,
height: usize,
porch_bytes: usize,
trailer_bytes: usize,
data: &'a mut [u8]
) -> Self
[src]
width: usize,
height: usize,
porch_bytes: usize,
trailer_bytes: usize,
data: &'a mut [u8]
) -> Self
Trait Implementations
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
impl<'a, Pixel: Debug> Debug for Buffer<'a, Pixel>
[src]
impl<'a, Pixel> Display for Buffer<'a, Pixel>
[src]
Format implementation for the buffer
Auto Trait Implementations
impl<'a, Pixel> Send for Buffer<'a, Pixel> where
Pixel: Send,
Pixel: Send,
impl<'a, Pixel> Sync for Buffer<'a, Pixel> where
Pixel: Sync,
Pixel: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,