| Crates.io | term_lattice |
| lib.rs | term_lattice |
| version | 0.4.2 |
| created_at | 2023-04-01 04:14:47.792464+00 |
| updated_at | 2023-04-19 00:12:43.02708+00 |
| description | 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. |
| homepage | https://github.com/A4-Tacks/rust-term_lattice |
| repository | https://github.com/A4-Tacks/rust-term_lattice |
| max_upload_size | |
| id | 827075 |
| size | 380,942 |
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.

Create a new color lattice at a fixed location and use incremental output to quickly refresh.
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));
}
The number of buffer rows must be an even number. found: {}
use term_lattice::ScreenBuffer;
ScreenBuffer::new([100, 101]);