pub struct Framebuffer { /* private fields */ }Implementations§
Source§impl Framebuffer
impl Framebuffer
pub fn new(width: u16, height: u16) -> Self
pub fn width(&self) -> u16
pub fn height(&self) -> u16
pub fn pixels(&self) -> &[Color]
pub fn clear(&mut self, color: Color)
pub fn copy_from(&mut self, other: &Self)
pub fn get_pixel(&self, x: u16, y: u16) -> Option<Color>
pub fn set_pixel(&mut self, x: u16, y: u16, color: Color) -> Result<()>
pub fn fill_rect(&mut self, window: DrawWindow, color: Color) -> Result<()>
Trait Implementations§
Source§impl Clone for Framebuffer
impl Clone for Framebuffer
Source§fn clone(&self) -> Framebuffer
fn clone(&self) -> Framebuffer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Framebuffer
impl RefUnwindSafe for Framebuffer
impl Send for Framebuffer
impl Sync for Framebuffer
impl Unpin for Framebuffer
impl UnsafeUnpin for Framebuffer
impl UnwindSafe for Framebuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more