mirror of https://github.com/cy384/ssheven.git
have fast draw mode clear rows at a time instead of entire screen
This commit is contained in:
parent
d6306c706e
commit
fa96870408
|
@ -418,6 +418,14 @@ void draw_screen_color(Rect* r)
|
||||||
draw_resize_corner();
|
draw_resize_corner();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void erase_row(int i)
|
||||||
|
{
|
||||||
|
Rect left = cell_rect(0, i, (con.win->portRect));
|
||||||
|
Rect right = cell_rect(con.size_x, i, (con.win->portRect));
|
||||||
|
|
||||||
|
UnionRect(&left, &right, &left);
|
||||||
|
EraseRect(&left);
|
||||||
|
}
|
||||||
|
|
||||||
void draw_screen_fast(Rect* r)
|
void draw_screen_fast(Rect* r)
|
||||||
{
|
{
|
||||||
|
@ -434,7 +442,7 @@ void draw_screen_fast(Rect* r)
|
||||||
qd.thePort->bkColor = whiteColor;
|
qd.thePort->bkColor = whiteColor;
|
||||||
qd.thePort->fgColor = blackColor;
|
qd.thePort->fgColor = blackColor;
|
||||||
|
|
||||||
EraseRect(r);
|
//EraseRect(r);
|
||||||
|
|
||||||
TextFont(kFontIDMonaco);
|
TextFont(kFontIDMonaco);
|
||||||
TextSize(9);
|
TextSize(9);
|
||||||
|
@ -476,6 +484,8 @@ void draw_screen_fast(Rect* r)
|
||||||
|
|
||||||
for(pos.row = 0; pos.row < con.size_y; pos.row++)
|
for(pos.row = 0; pos.row < con.size_y; pos.row++)
|
||||||
{
|
{
|
||||||
|
erase_row(pos.row);
|
||||||
|
|
||||||
for (pos.col = 0; pos.col < con.size_x; pos.col++)
|
for (pos.col = 0; pos.col < con.size_x; pos.col++)
|
||||||
{
|
{
|
||||||
vtsc = vterm_screen_unsafe_get_cell(con.vts, pos);
|
vtsc = vterm_screen_unsafe_get_cell(con.vts, pos);
|
||||||
|
|
Loading…
Reference in New Issue