pub struct CanvasAnsi { /* private fields */ }Expand description
Canvas for ANSI terminal rendering.
Uses Unicode half-block characters (▀ U+2580) where the foreground color paints the top half and the background color paints the bottom half. This yields 2 vertical pixels per character.
Trait Implementations§
Source§impl Canvas for CanvasAnsi
impl Canvas for CanvasAnsi
Source§fn new(width: u32, height: u32, dark_pixel: Color, light_pixel: Color) -> Self
fn new(width: u32, height: u32, dark_pixel: Color, light_pixel: Color) -> Self
Constructs a new canvas of the given dimensions.
Source§fn draw_dark_pixel(&mut self, x: u32, y: u32)
fn draw_dark_pixel(&mut self, x: u32, y: u32)
Draws a single dark pixel at the (x, y) coordinate.
Source§fn into_image(self) -> String
fn into_image(self) -> String
Finalize the canvas to a real image.
Auto Trait Implementations§
impl Freeze for CanvasAnsi
impl RefUnwindSafe for CanvasAnsi
impl Send for CanvasAnsi
impl Sync for CanvasAnsi
impl Unpin for CanvasAnsi
impl UnsafeUnpin for CanvasAnsi
impl UnwindSafe for CanvasAnsi
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