Changeset 7e38970d in mainline for uspace/lib/congfx/src/console.c
- Timestamp:
- 2020-12-07T00:08:37Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 25f26600
- Parents:
- 7a873f0 (diff), 8596474 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/congfx/src/console.c
r7a873f0 r7e38970d 207 207 208 208 /* Check that we support all requested flags */ 209 if ((params->flags & ~ bmpf_color_key) != 0)209 if ((params->flags & ~(bmpf_color_key | bmpf_colorize)) != 0) 210 210 return ENOTSUP; 211 211 … … 296 296 297 297 if ((cbm->flags & bmpf_color_key) == 0) { 298 /* Simple copy */ 298 299 for (y = crect.p0.y; y < crect.p1.y; y++) { 299 300 console_set_pos(cbm->cgc->con, crect.p0.x, y); … … 312 313 } 313 314 } 314 } else { 315 } else if ((cbm->flags & bmpf_colorize) == 0) { 316 /* Color key */ 315 317 for (y = crect.p0.y; y < crect.p1.y; y++) { 316 318 for (x = crect.p0.x; x < crect.p1.x; x++) { … … 332 334 } 333 335 } 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 } 334 359 } 335 360
Note:
See TracChangeset
for help on using the changeset viewer.