Struct tinybit::PixelBuffer [−][src]
Character buffer holds all the “pixels” to be drawn on the screen
Fields
pixels: Vec<Option<Pixel>>
Pixels
Implementations
impl PixelBuffer
[src]
pub fn new(size: ScreenSize) -> Self
[src]
Create a new character buffer. Should be at least the same size as the viewport it’s relative to
pub fn index_to_coords(&self, index: usize) -> ScreenPos
[src]
Convert index to x y coordinates
pub fn get_pixel(&self, pos: ScreenPos) -> Option<Pixel>
[src]
Get the pixel at the given screen position
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PixelBuffer
impl Send for PixelBuffer
impl Sync for PixelBuffer
impl Unpin for PixelBuffer
impl UnwindSafe for PixelBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,