pub struct PixelBuffer {
pub pixels: Vec<Option<Pixel>>,
/* private fields */
}Expand description
Character buffer holds all the “pixels” to be drawn on the screen
Fields§
§pixels: Vec<Option<Pixel>>Pixels
Implementations§
Source§impl PixelBuffer
impl PixelBuffer
Sourcepub fn new(size: ScreenSize) -> Self
pub fn new(size: ScreenSize) -> Self
Create a new character buffer. Should be at least the same size as the viewport it’s relative to
Sourcepub fn index_to_coords(&self, index: usize) -> ScreenPos
pub fn index_to_coords(&self, index: usize) -> ScreenPos
Convert index to x y coordinates
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PixelBuffer
impl RefUnwindSafe for PixelBuffer
impl Send for PixelBuffer
impl Sync for PixelBuffer
impl Unpin for PixelBuffer
impl UnwindSafe for PixelBuffer
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