version 1.97, 2019/07/06 20:37:29 |
version 1.98, 2019/07/16 10:30:56 |
|
|
grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg) |
grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg) |
{ |
{ |
struct grid_line *gl; |
struct grid_line *gl; |
u_int xx, yy; |
u_int xx, yy, ox, sx; |
|
|
if (nx == 0 || ny == 0) |
if (nx == 0 || ny == 0) |
return; |
return; |
|
|
|
|
for (yy = py; yy < py + ny; yy++) { |
for (yy = py; yy < py + ny; yy++) { |
gl = &gd->linedata[yy]; |
gl = &gd->linedata[yy]; |
if (px + nx >= gd->sx && px < gl->cellused) |
|
gl->cellused = px; |
sx = gd->sx; |
if (px > gl->cellsize && COLOUR_DEFAULT(bg)) |
if (sx > gl->cellsize) |
continue; |
sx = gl->cellsize; |
if (px + nx >= gl->cellsize && COLOUR_DEFAULT(bg)) { |
ox = nx; |
gl->cellsize = px; |
if (COLOUR_DEFAULT(bg)) { |
continue; |
if (px > sx) |
|
continue; |
|
if (px + nx > sx) |
|
ox = sx - px; |
} |
} |
grid_expand_line(gd, yy, px + nx, 8); /* default bg first */ |
|
for (xx = px; xx < px + nx; xx++) |
grid_expand_line(gd, yy, px + ox, 8); /* default bg first */ |
|
for (xx = px; xx < px + ox; xx++) |
grid_clear_cell(gd, xx, yy, bg); |
grid_clear_cell(gd, xx, yy, bg); |
} |
} |
} |
} |
|
|
struct grid_line *gl; |
struct grid_line *gl; |
struct grid_cell gc; |
struct grid_cell gc; |
u_int yy, width, i, at, first; |
u_int yy, width, i, at, first; |
|
|
|
/* Do not reflow to the same size. */ |
|
if (sx == gd->sx) |
|
return; |
|
|
/* |
/* |
* Create a destination grid. This is just used as a container for the |
* Create a destination grid. This is just used as a container for the |