Ignore:
Timestamp:
Dec 11, 2003, 5:31:49 PM (19 years ago)
Author:
Sam Hocevar
Message:
  • src/graphics.c: + Internally cache screen width and height.
  • src/bitmap.c: + Added alpha support to caca_draw_bitmap(). For now, we only treat 0%

alpha as fully transparent, and any other value as fully opaque.

+ Slightly tuned colour weights in the renderer.
+ caca_set_bitmap_palette() takes unsigned ints.

  • examples/demo.c: + Added a crap render demo.
  • examples/aafire.c: + Set a 20ms delay. + Added alpha values to the palette.
  • examples/view.c: + Draw a gray checkered grid below the image so that transparent images

look a lot nicer.

+ 'f' toggles "fullscreen" mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/line.c

    r205 r246  
    172172    else if(bits1 & (1<<1))
    173173    {
    174         int xmax = caca_get_width() - 1;
     174        int xmax = _caca_width - 1;
    175175        s->y1 = s->y2 - (s->x2 - xmax) * (s->y2 - s->y1) / (s->x2 - s->x1);
    176176        s->x1 = xmax;
     
    183183    else if(bits1 & (1<<3))
    184184    {
    185         int ymax = caca_get_height() - 1;
     185        int ymax = _caca_height - 1;
    186186        s->x1 = s->x2 - (s->y2 - ymax) * (s->x2 - s->x1) / (s->y2 - s->y1);
    187187        s->y1 = ymax;
     
    204204    if(x < 0)
    205205        b |= (1<<0);
    206     else if(x >= (int)caca_get_width())
     206    else if(x >= (int)_caca_width)
    207207        b |= (1<<1);
    208208
    209209    if(y < 0)
    210210        b |= (1<<2);
    211     else if(y >= (int)caca_get_height())
     211    else if(y >= (int)_caca_height)
    212212        b |= (1<<3);
    213213
Note: See TracChangeset for help on using the changeset viewer.