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 validate_dimensions(
width: u32,
height: u32,
_dark: &Color,
_light: &Color,
) -> Result<(), RenderError>
fn validate_dimensions( width: u32, height: u32, _dark: &Color, _light: &Color, ) -> Result<(), RenderError>
Checks dimensions and pixel-dependent resource limits before allocation. Read more
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 Forget for CanvasAnsi
impl Freeze for CanvasAnsi
impl Move for CanvasAnsi
impl RefUnwindSafe for CanvasAnsi
impl Send for CanvasAnsiwhere
RawVecInner: Send,
impl Sync for CanvasAnsiwhere
RawVecInner: Sync,
impl Unpin for CanvasAnsi
impl UnsafeUnpin for CanvasAnsi
impl UnwindSafe for CanvasAnsiwhere
RawVecInner: UnwindSafe,
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