Changeset 661 for libcaca


Ignore:
Timestamp:
Mar 22, 2006, 4:00:43 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Added colour to the gamma test.
File:
1 edited

Legend:

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

    r659 r661  
    2525#include "caca.h"
    2626
    27 uint32_t buffer[256];
     27uint32_t buffer[256 * 4];
    2828
    2929int main(void)
     
    3939
    4040    for(x = 0; x < 256; x++)
     41    {
    4142        buffer[x] = (x << 16) | (x << 8) | (x<< 0);
     43        buffer[x + 256] = (0xff << 16) |    (x << 8) | (0x00 << 0);
     44        buffer[x + 512] = (0x00 << 16) | (0xff << 8) |    (x << 0);
     45        buffer[x + 768] =    (x << 16) | (0x00 << 8) | (0xff << 0);
     46    }
    4247
    43     left = cucul_create_bitmap(qq, 32, 256, 1, 4 * 256,
     48    left = cucul_create_bitmap(qq, 32, 256, 4, 4 * 256,
    4449                               0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
    45     right = cucul_create_bitmap(qq, 32, 256, 1, 4 * 256,
     50    right = cucul_create_bitmap(qq, 32, 256, 4, 4 * 256,
    4651                                0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
    4752    caca_set_delay(kk, 20000);
     
    6469
    6570        cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE);
    66         cucul_printf(qq, 1, 2, "gamma %g", g);
     71        cucul_printf(qq, 2, 1, "gamma=%g", g);
    6772
    6873        caca_display(kk);
Note: See TracChangeset for help on using the changeset viewer.