Home | History | Annotate | Download | only in util

Lines Matching refs:bi

227 block_best (const biimage_t &bi, bool *inverse)
229 assert (bi.width <= CELL_W);
230 assert (bi.height <= CELL_H);
241 for (unsigned int y = 0; y < bi.height; y++)
242 for (unsigned int x = 0; x < bi.width; x++) {
243 unsigned int c = bi (x, y);
249 quad[2 * y / bi.height][2 * x / bi.width] += c;
250 quad_i[2 * y / bi.height][2 * x / bi.width] += c_i;
256 for (unsigned int i = 1; i < bi.height; i++) {
260 for (unsigned int i = 1; i < bi.width; i++) {
285 for (unsigned int i = 0; i < bi.height - 1; i++)
303 unsigned int which = lround ((double) ((best_i + 1) * 8) / bi.height);
317 for (unsigned int i = 0; i < bi.width - 1; i++)
335 unsigned int which = lround ((double) ((best_i + 1) * 8) / bi.width);
392 biimage_t bi (CELL_W, CELL_H);
397 bi.set (cell);
398 if (bi.unicolor) {
399 if (last_bg != bi.bg) {
400 printf ("%c[%dm", ESC_E, 40 + bi.bg);
401 last_bg = bi.bg;
407 const char *c = block_best (bi, &inverse);
409 if (last_bg != bi.fg || last_fg != bi.bg) {
410 printf ("%c[%d;%dm", ESC_E, 30 + bi.bg, 40 + bi.fg);
411 last_bg = bi.fg;
412 last_fg = bi.bg;
415 if (last_bg != bi.bg || last_fg != bi.fg) {
416 printf ("%c[%d;%dm", ESC_E, 40 + bi.bg, 30 + bi.fg);
417 last_bg = bi.bg;
418 last_fg = bi.fg;