Draw wide characters correctly

Draw the full background for wide characters as soon as they are
encountered. Don't draw any foreground or background if width is zero as
this means the previous character was wide.

Fixes #17
This commit is contained in:
Leroy Hopson 2021-07-12 22:24:21 +07:00 committed by Leroy Hopson
parent 683b0e3304
commit e13bc7e082
2 changed files with 10 additions and 7 deletions

View file

@ -37,7 +37,7 @@ private:
public:
std::pair<Color, Color> get_cell_colors(const tsm_screen_attr *attr);
void draw_background(int row, int col, Color bgcol);
void draw_background(int row, int col, Color bgcol, int width);
void draw_foreground(int row, int col, char *ch, const tsm_screen_attr *attr,
Color fgcol);