Changeset 3223 for libcaca/trunk/caca
- Timestamp:
- Nov 2, 2008, 10:18:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/codec/export.c
r3214 r3223 461 461 int x, y, len; 462 462 int maxcols; 463 int has_multi_cell_row = 0; 463 464 464 465 /* Table */ … … 466 467 for(y = 0; y < cv->height; y++) 467 468 { 469 uint32_t *lineattr = cv->attrs + y * cv->width; 468 470 uint32_t *linechar = cv->chars + y * cv->width; 469 471 int cols = 0; … … 471 473 for(x = 0; x < cv->width; x++) 472 474 { 475 if((! has_multi_cell_row) 476 && 477 (x > 1) 478 && 479 (caca_attr_to_ansi_bg(lineattr[x - 1]) 480 != 481 caca_attr_to_ansi_bg(lineattr[x])) 482 && 483 ((caca_attr_to_ansi_bg(lineattr[x]) < 0x10) 484 ? 485 (_caca_attr_to_rgb24bg(lineattr[x - 1]) 486 != 487 _caca_attr_to_rgb24bg(lineattr[x])) 488 : 489 0)) 490 { 491 has_multi_cell_row = 1; 492 } 473 493 if(linechar[x] == 0x00000009) 474 494 while((cols + 1) % 8) … … 507 527 * (see below) */ 508 528 len = 1; 509 while((x + len < cv->width) 529 while((y || ! has_multi_cell_row) 530 && 531 (x + len < cv->width) 510 532 && 511 533 (caca_attr_to_ansi_bg(lineattr[x + len]) … … 516 538 ? 517 539 (_caca_attr_to_rgb24bg(lineattr[x + len]) 518 &&540 == 519 541 _caca_attr_to_rgb24bg(lineattr[x])) 520 542 : … … 544 566 if((! i) || (lineattr[x + i] != lineattr[x + i - 1])) 545 567 { 546 needfont = caca_attr_to_ansi_fg(lineattr[x + i]) < 0x10;568 needfont = (caca_attr_to_ansi_fg(lineattr[x + i]) != CACA_DEFAULT); 547 569 548 570 if(needfont)
Note: See TracChangeset
for help on using the changeset viewer.