~kiwec/ke

ke/src/Canvas.h -rw-r--r-- 300 bytes
1cc8481d — Wolf Clément Fix compilation 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

struct Canvas {
	int start_col;
	int start_line;
	int end_col;
	int end_line;

	int height() {
		return end_line - start_line;
	}

	int width() {
		return end_col - start_col;
	}

	/// Print a line using termbox
	static void print(const wchar_t* text, int x, int y, int fg, int bg);
};