Struct drawille::Canvas [−][src]
pub struct Canvas { /* fields omitted */ }
Expand description
A canvas object that can be used to draw to the terminal using Braille characters.
Implementations
Creates a new Canvas
with the given width and height.
Note that the Canvas
can still draw outside the given dimensions (expanding the canvas)
if a pixel is set outside the dimensions.
Sets a pixel at the specified coordinates. specifying the color of the braille char
Draws text at the specified coordinates (top-left of the text) up to max_width length
Detects whether the pixel at the given coordinates is set.
Returns a Vec
of each row of the Canvas
.
Note that each row is actually four pixels high due to the fact that a single Braille character spans two by four pixels.
Draws a line from (x1, y1)
to (x2, y2)
onto the Canvas
.
Draws a line from (x1, y1)
to (x2, y2)
onto the Canvas
specifying the color of the line
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Canvas
impl UnwindSafe for Canvas
Blanket Implementations
Mutably borrows from an owned value. Read more