Crate drawille

Source
Expand description

drawille – a terminal graphics library for Rust, based on the Python library drawille.

This crate provides an interface for utilising Braille characters to draw a picture to a terminal, allowing for much smaller pixels but losing proper colour support.

§Example

extern crate drawille;

use drawille::Canvas;

fn main() {
    let mut canvas = Canvas::new(10, 10);
    canvas.set(5, 4);
    canvas.line(2, 2, 8, 8);
    assert_eq!(canvas.frame(), [
" ⢄    ",
"  ⠙⢄  ",
"    ⠁ "].join("\n"));
}

Structs§

Canvas
A canvas object that can be used to draw to the terminal using Braille characters.
Turtle
A ‘turtle’ that can walk around a canvas drawing lines.

Enums§

PixelColor
The 8 standard colors.