tegrine 0.1.3

Draw in a Terminal -- Ordered with Instances -> Dots like 2D Vertex/Pixels
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::render::{ D2, Tegrine };
use bresenham::Bresenham;


impl Tegrine {
	pub fn draw_line(&mut self, ins: usize, dot: usize, a: D2, b: D2) {
		for (x, y) in Bresenham::new((a.x, a.y), (b.x, b.y)) {
			self.draw_pixel(ins, dot, D2::new(x, y));
		}
	}
}