Ignore:
Timestamp:
Nov 25, 2007, 6:13:10 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Switch to caca_create_display(NULL) in a few places to document the behaviour.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/hsv.c

    r1753 r2062  
    3030int main(int argc, char *argv[])
    3131{
     32    caca_display_t *dp;
    3233    cucul_canvas_t *cv;
    33     caca_display_t *dp;
    3434
    3535    cucul_dither_t *dither;
    3636    int x, y;
    3737
    38     cv = cucul_create_canvas(0, 0);
    39     if(cv == NULL)
    40     {
    41         printf("Can't created canvas\n");
    42         return -1;
    43     }
    44     dp = caca_create_display(cv);
     38    dp = caca_create_display(NULL);
    4539    if(dp == NULL)
    4640    {
     
    4842        return -1;
    4943    }
     44
     45    cv = caca_get_canvas(dp);
    5046
    5147    for(y = 0; y < 256; y++)
     
    5753    dither = cucul_create_dither(32, 256, 256, 4 * 256,
    5854                                 0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
    59     cucul_dither_bitmap(cv, 0, 0, cucul_get_canvas_width(cv),
     55    cucul_dither_bitmap(caca_get_canvas(dp), 0, 0, cucul_get_canvas_width(cv),
    6056                        cucul_get_canvas_height(cv), dither, buffer);
    6157    cucul_free_dither(dither);
     
    6662
    6763    caca_free_display(dp);
    68     cucul_free_canvas(cv);
    6964
    7065    return 0;
Note: See TracChangeset for help on using the changeset viewer.