#ansi-term #terminal #terminal-colors #tui #draw #plot #true-color

term_lattice

Used to use ANSI output dot matrix drawing boards on terminals that support VT100. Due to the use of incremental output, it is very fast.

7 unstable releases (3 breaking)

0.4.2 Apr 19, 2023
0.4.1 Apr 17, 2023
0.3.0 Apr 5, 2023
0.2.0 Apr 5, 2023
0.1.2 Apr 1, 2023

#863 in Command-line interface


Used in timg

MIT license

350KB
866 lines

Used to use ANSI output dot matrix drawing boards on terminals that support VT100. Due to the use of incremental output, it is very fast.

  • Supports true color and 256 colors

Info

Presentation Effects

01 from github 02 from github

Create a new color lattice at a fixed location and use incremental output to quickly refresh.

Examples

use term_lattice::{Config,Color,ScreenBuffer};

let n = 100;
let mut cfg = Config::new();
cfg.default_color = Color::C256(15);
cfg.chromatic_aberration = 1;
let a = ScreenBuffer::new_from_cfg([n; 2], cfg);

for i in 0..n {
    a.set([i; 2], Color::C256((i & 0xff) as u8));
    println!("\x1b[H{}", a.flush(false));
}

Panics

The number of buffer rows must be an even number. found: {}

Examples

use term_lattice::ScreenBuffer;
ScreenBuffer::new([100, 101]);

No runtime deps