Changeset 1819


Ignore:
Timestamp:
Sep 30, 2007, 12:12:19 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Improve rotation output by avoiding white-on-black attributes to appear due to spaces.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/transform.c

    r1816 r1819  
    294294            }
    295295
     296            /* If one of the characters is a space, we simply ignore
     297             * its colour attributes. Otherwise the resulting characters
     298             * may have totally wrong colours. */
     299            if(pair[0] == ' ')
     300                attr1 = attr2;
     301            else if(pair[1] == ' ')
     302                attr2 = attr1;
    296303
    297304            leftpair(pair);
     
    403410                attr2 = cv->attrs[cv->width * y + x * 2 + 1];
    404411            }
     412
     413            /* If one of the characters is a space, we simply ignore
     414             * its colour attributes. Otherwise the resulting characters
     415             * may have totally wrong colours. */
     416            if(pair[0] == ' ')
     417                attr1 = attr2;
     418            else if(pair[1] == ' ')
     419                attr2 = attr1;
    405420
    406421            rightpair(pair);
Note: See TracChangeset for help on using the changeset viewer.