Ignore:
Timestamp:
Oct 29, 2006, 1:53:46 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Use the LSB of alpha and blue components to encode additional flags such as bold or underline. No higher level support for these yet, but at least everything is consistent.
  • Created cucul_set_attr_ansi() and cucul_set_attr_argb() which are bound to replace cucul_set_color() and cucul_set_truecolor().
File:
1 edited

Legend:

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

    r1231 r1254  
    4141int cucul_invert(cucul_canvas_t *cv)
    4242{
    43     uint32_t *attr = cv->attr;
     43    uint32_t *attrs = cv->attrs;
    4444    unsigned int i;
    4545
    4646    for(i = cv->height * cv->width; i--; )
    4747    {
    48         *attr = *attr ^ 0x000f000f;
    49         attr++;
     48        *attrs = *attrs ^ 0x000f000f;
     49        attrs++;
    5050    }
    5151
     
    7171        uint32_t *cleft = cv->chars + y * cv->width;
    7272        uint32_t *cright = cleft + cv->width - 1;
    73         uint32_t *aleft = cv->attr + y * cv->width;
     73        uint32_t *aleft = cv->attrs + y * cv->width;
    7474        uint32_t *aright = aleft + cv->width - 1;
    7575
     
    128128        uint32_t *ctop = cv->chars + x;
    129129        uint32_t *cbottom = ctop + cv->width * (cv->height - 1);
    130         uint32_t *atop = cv->attr + x;
     130        uint32_t *atop = cv->attrs + x;
    131131        uint32_t *abottom = atop + cv->width * (cv->height - 1);
    132132
     
    167167    uint32_t *cbegin = cv->chars;
    168168    uint32_t *cend = cbegin + cv->width * cv->height - 1;
    169     uint32_t *abegin = cv->attr;
     169    uint32_t *abegin = cv->attrs;
    170170    uint32_t *aend = abegin + cv->width * cv->height - 1;
    171171    unsigned int y;
Note: See TracChangeset for help on using the changeset viewer.