Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/congfx/src/console.c

    r0d62c10 rafcf704  
    207207
    208208        /* Check that we support all requested flags */
    209         if ((params->flags & ~(bmpf_color_key | bmpf_colorize)) != 0)
     209        if ((params->flags & ~bmpf_color_key) != 0)
    210210                return ENOTSUP;
    211211
     
    296296
    297297        if ((cbm->flags & bmpf_color_key) == 0) {
    298                 /* Simple copy */
    299298                for (y = crect.p0.y; y < crect.p1.y; y++) {
    300299                        console_set_pos(cbm->cgc->con, crect.p0.x, y);
     
    313312                        }
    314313                }
    315         } else if ((cbm->flags & bmpf_colorize) == 0) {
    316                 /* Color key */
     314        } else {
    317315                for (y = crect.p0.y; y < crect.p1.y; y++) {
    318316                        for (x = crect.p0.x; x < crect.p1.x; x++) {
     
    334332                        }
    335333                }
    336         } else {
    337                 /* Color key & colorize */
    338                 console_set_rgb_color(cbm->cgc->con, cbm->cgc->clr,
    339                     cbm->cgc->clr);
    340 
    341                 for (y = crect.p0.y; y < crect.p1.y; y++) {
    342                         for (x = crect.p0.x; x < crect.p1.x; x++) {
    343 
    344                                 clr = pixelmap_get_pixel(&pixelmap,
    345                                     x - offs.x - cbm->rect.p0.x,
    346                                     y - offs.y - cbm->rect.p0.y);
    347 
    348                                 if (clr != cbm->key_color) {
    349                                         console_set_pos(cbm->cgc->con, x, y);
    350                                         rv = fputc('X', cbm->cgc->fout);
    351                                         if (rv < 0)
    352                                                 return EIO;
    353 
    354                                         console_flush(cbm->cgc->con);
    355                                 }
    356 
    357                         }
    358                 }
    359334        }
    360335
Note: See TracChangeset for help on using the changeset viewer.