Changeset 1232


Ignore:
Timestamp:
Oct 26, 2006, 10:11:39 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Minor changes to the frames test.
File:
1 edited

Legend:

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

    r1048 r1232  
    3636        cucul_create_canvas_frame(cv, frame);
    3737
     38    fprintf(stderr, "canvas created, size is %ix%i\n",
     39            cucul_get_canvas_width(cv), cucul_get_canvas_height(cv));
     40
    3841    /* Resize it to 150 x 80 (around 19MB) */
    3942    cucul_set_canvas_size(cv, 150, 80);
    4043
    41     /* Resize it to a more decent size */
    42     cucul_set_canvas_size(cv, 41, 16);
    43 
    44     dp = caca_create_display(cv);
    45     caca_set_display_time(dp, 50000);
     44    fprintf(stderr, "canvas expanded, size is %ix%i\n",
     45            cucul_get_canvas_width(cv), cucul_get_canvas_height(cv));
    4646
    4747    /* Fill the first 16 frames with a different colour */
     
    5050        cucul_set_canvas_frame(cv, frame);
    5151        cucul_set_color(cv, CUCUL_COLOR_WHITE, frame);
    52         cucul_clear_canvas(cv);
     52        cucul_fill_box(cv, 0, 0, 40, 15, ":");
    5353        cucul_set_color(cv, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
    54         cucul_putstr(cv, frame * 5 / 2, frame, "CACA");
     54        cucul_putstr(cv, frame * 5 / 2, frame, "カカ");
    5555    }
     56
     57    /* Resize it to a more decent size */
     58    cucul_set_canvas_size(cv, 41, 16);
     59
     60    fprintf(stderr, "canvas shrinked, size is %ix%i\n",
     61            cucul_get_canvas_width(cv), cucul_get_canvas_height(cv));
     62
     63    cucul_set_color(cv, CUCUL_COLOR_DEFAULT, CUCUL_COLOR_TRANSPARENT);
     64    dp = caca_create_display(cv);
     65    caca_set_display_time(dp, 50000);
     66
     67    fprintf(stderr, "display attached, size is %ix%i\n",
     68            cucul_get_canvas_width(cv), cucul_get_canvas_height(cv));
    5669
    5770    n = 0;
Note: See TracChangeset for help on using the changeset viewer.