コード例 #1
0
ファイル: vo_caca.c プロジェクト: divVerent/mplayer2
static void uninit(struct vo *vo)
{
    caca_free_dither(dither);
    dither = NULL;
    caca_free_display(display);
    caca_free_canvas(canvas);
}
コード例 #2
0
static int resize(void)
{
    screen_w = caca_get_canvas_width(canvas);
    screen_h = caca_get_canvas_height(canvas);

    caca_free_dither(dither);
    talloc_free(dither_buffer);

    dither = caca_create_dither(bpp, image_width, image_height,
                                depth * image_width,
                                rmask, gmask, bmask, amask);
    if (dither == NULL) {
        mp_msg(MSGT_VO, MSGL_FATAL, "vo_caca: caca_create_dither failed!\n");
        return ENOSYS;
    }
    dither_buffer =
        talloc_array(NULL, uint8_t, depth * image_width * image_height);

    /* Default libcaca features */
    caca_set_dither_antialias(dither, dither_antialias);
    caca_set_dither_charset(dither, dither_charset);
    caca_set_dither_color(dither, dither_color);
    caca_set_dither_algorithm(dither, dither_algo);

    return 0;
}
コード例 #3
0
ファイル: test_caca.c プロジェクト: xspager/Terra_CHIP8
int main(void)
{
    //                   R G B A
    uint32_t pattern = 0xFFFF00FF;

#ifdef __APPLE__
    memset_pattern4(gfx, &pattern, sizeof(gfx));
#else
    wmemset(gfx, pattern, (64*32) * sizeof(char));
#endif

    gfx[0] =    0xFF0000FF; // R
    gfx[1] =    0x00FF00FF; // G
    gfx[2] =    0x0000FFFF; // B
    gfx[63] =   0xFF0000FF; // R
    gfx[64*31] =0x00FF00FF; // G
    int x = 64, y = 32;
    gfx[(y-1)*64+(x-1)] = 0x0000FFFF; // B

    caca_canvas_t *cv; caca_display_t *dp; caca_event_t ev;
    dp = caca_create_display(NULL);
    if(!dp)
        return 1;
    /*
    printf("Current driver: %s\n", caca_get_display_driver(dp));
    char **drivers = caca_get_display_driver_list();
    caca_free_display(dp);
    while(*drivers != NULL) {
        printf("%s\n", *drivers);
        drivers++;
    }
    exit(0);*/
    cv = caca_get_canvas(dp);
    caca_dither_t *dither = caca_create_dither(32, 64, 32, 4*64,
        0xFF000000,
        0x00FF0000,
        0x0000FF00,
        0x000000FF);
    int cw = caca_get_canvas_width(cv);
    int ch = caca_get_canvas_height(cv);
    caca_set_display_title(dp, "Hello!");
    //caca_set_color_ansi(cv, CACA_BLUE, CACA_WHITE);
    //caca_put_str(cv, 0, 0, "This is a message");
    caca_dither_bitmap(cv, 0,0,cw,ch, dither, gfx);
    caca_refresh_display(dp);

    caca_free_dither(dither);
    //caca_get_event(dp, CACA_EVENT_KEY_PRESS, &ev, -1);
    caca_get_event(dp, CACA_EVENT_KEY_PRESS, NULL, -1);
    caca_free_display(dp);
    return 0;
}
コード例 #4
0
ファイル: p5terminal.c プロジェクト: rlfbckr/p5terminal
void processing_terminal() {

    setup();
    while (pt.running) {

        //width = caca_get_canvas_width(pt.cv);
        // height = caca_get_canvas_height(pt.cv);

        if (!pt.PT_USE_DITHERING) {
            width = caca_get_canvas_width(pt.cv) / X_SCALE;
            height = caca_get_canvas_height(pt.cv);
        } else {
            width = pt.PT_bitmap_width;
            height = pt.PT_bitmap_height;

        }
        pt.DITHERED_DRAW = 0;
        pt.textrenderjoblist_items = 0;
        if (!pt.PT_paused) {
            draw();
        }

        if (pt.PT_USE_DITHERING &&  pt.DITHERED_DRAW) {
            caca_dither_bitmap(caca_get_canvas(pt.dp), 0, 0, caca_get_canvas_width(pt.cv),
                               caca_get_canvas_height(pt.cv), pt.PT_dither, pt.PT_buffer);
        }
        render_text_items();

        int duration = caca_get_display_time(pt.dp);
        if (duration > 0) {
            frameRate = (frameRate * 0.9) + ((1000000 / duration) * 0.1); //(1000 / duration);
        }
        caca_printf(pt.cv, 0, caca_get_canvas_height(pt.cv) - 1, "%d/%d  key=%c (%d) fps=%f (%d)", width, height, key, key, frameRate,duration);
        caca_refresh_display(pt.dp);

    }
    if (pt.PT_USE_DITHERING)  caca_free_dither(pt.PT_dither);
    caca_free_display(pt.dp);
    caca_free_canvas(pt.cv);
    closeKeyboard();
}
コード例 #5
0
void
_mod_caca_splash_free (lw6sys_context_t * sys_context, _mod_caca_context_t * caca_context, caca_font_t * fo, caca_dither_t * di, uint8_t * buff, int init)
{
  static caca_font_t *f = NULL;
  static caca_dither_t *d = NULL;
  static uint8_t *buf = NULL;

  if (init == 1)
    {
      f = fo;
      d = di;
      buf = buff;
    }
  if (init == 0)
    {
      _plasma (sys_context, FREE, caca_context->canvas);
      free (buf);
      caca_free_dither (d);
      caca_free_font (f);
    }
}
コード例 #6
0
ファイル: caca_gfx.c プロジェクト: joolswills/RetroArch
static void caca_gfx_free(void *data)
{
   (void)data;

   if (caca_display)
   {
      caca_free_display(caca_display);
      caca_display = NULL;
   }

   if (caca_dither)
   {
      caca_free_dither(caca_dither);
      caca_dither = NULL;
   }

   if (caca_menu_frame)
   {
      free(caca_menu_frame);
      caca_menu_frame = NULL;
   }
}
コード例 #7
0
ファイル: hsv.c プロジェクト: gitpan/Term-Caca
int main(int argc, char *argv[])
{
    caca_display_t *dp;
    caca_canvas_t *cv;

    caca_dither_t *dither;
    int x, y;

    dp = caca_create_display(NULL);
    if(dp == NULL)
    {
        printf("Can't create display\n");
        return -1;
    }

    cv = caca_get_canvas(dp);

    for(y = 0; y < 256; y++)
        for(x = 0; x < 256; x++)
    {
        buffer[y * 256 + x] = ((y * x / 256) << 16) | ((y * x / 256) << 8) | (x<< 0);
    }

    dither = caca_create_dither(32, 256, 256, 4 * 256,
                                 0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
    caca_dither_bitmap(caca_get_canvas(dp), 0, 0, caca_get_canvas_width(cv),
                        caca_get_canvas_height(cv), dither, buffer);
    caca_free_dither(dither);

    caca_refresh_display(dp);

    caca_get_event(dp, CACA_EVENT_KEY_PRESS, NULL, -1);

    caca_free_display(dp);

    return 0;
}
コード例 #8
0
ファイル: font.c プロジェクト: Kirkman/libcaca
int main(int argc, char *argv[])
{
    caca_canvas_t *cv;
    caca_display_t *dp;
    caca_font_t *f;
    caca_dither_t *d;
    uint8_t *buf;
    unsigned int w, h;
    char const * const * fonts;

    /* Create a canvas */
    cv = caca_create_canvas(8, 2);
    if(cv == NULL)
    {
        printf("Can't create canvas\n");
        return -1;
    }


    /* Draw stuff on our canvas */
    caca_set_color_ansi(cv, CACA_WHITE, CACA_BLACK);
    caca_put_str(cv, 0, 0, "ABcde");
    caca_set_color_ansi(cv, CACA_LIGHTRED, CACA_BLACK);
    caca_put_str(cv, 5, 0, "\\o/");
    caca_set_color_ansi(cv, CACA_WHITE, CACA_BLUE);
    caca_put_str(cv, 0, 1, "&$âøÿØ?!");

    /* Load a libcaca internal font */
    fonts = caca_get_font_list();
    if(fonts[0] == NULL)
    {
        fprintf(stderr, "error: libcaca was compiled without any fonts\n");
        return -1;
    }
    f = caca_load_font(fonts[0], 0);
    if(f == NULL)
    {
        fprintf(stderr, "error: could not load font \"%s\"\n", fonts[0]);
        return -1;
    }

    /* Create our bitmap buffer (32-bit ARGB) */
    w = caca_get_canvas_width(cv) * caca_get_font_width(f);
    h = caca_get_canvas_height(cv) * caca_get_font_height(f);
    buf = malloc(4 * w * h);

    /* Render the canvas onto our image buffer */
    caca_render_canvas(cv, f, buf, w, h, 4 * w);

    /* Just for fun, render the image using libcaca */
    caca_set_canvas_size(cv, 80, 32);
    dp = caca_create_display(cv);

    {
#if defined(HAVE_ENDIAN_H)
        if(__BYTE_ORDER == __BIG_ENDIAN)
#else
        /* This is compile-time optimised with at least -O1 or -Os */
        uint32_t const tmp = 0x12345678;
        if(*(uint8_t const *)&tmp == 0x12)
#endif
            d = caca_create_dither(32, w, h, 4 * w,
                                    0xff0000, 0xff00, 0xff, 0xff000000);
        else
            d = caca_create_dither(32, w, h, 4 * w,
                                    0xff00, 0xff0000, 0xff000000, 0xff);
    }

    caca_dither_bitmap(cv, 0, 0, caca_get_canvas_width(cv),
                                  caca_get_canvas_height(cv), d, buf);
    caca_refresh_display(dp);

    caca_get_event(dp, CACA_EVENT_KEY_PRESS, NULL, -1);

    /* Free everything */
    caca_free_display(dp);
    free(buf);
    caca_free_dither(d);
    caca_free_font(f);
    caca_free_canvas(cv);

    return 0;
}
コード例 #9
0
ファイル: export.c プロジェクト: gitpan/Term-Caca
int main(int argc, char *argv[])
{
    caca_canvas_t *cv;
    caca_dither_t *dither;
    void *buffer;
    char *file, *format;
    char const * const * exports, * const * p;
    size_t len;
    int x, y;

    exports = caca_get_export_list();

    if(argc < 2 || argc > 3)
    {
        fprintf(stderr, "%s: wrong argument count\n", argv[0]);
        fprintf(stderr, "usage: %s [file] <format>\n", argv[0]);
        fprintf(stderr, "where <format> is one of:\n");
        for(p = exports; *p; p += 2)
            fprintf(stderr, " \"%s\" (%s)\n", *p, *(p + 1));
        exit(-1);
    }

    if(argc == 2)
    {
        file = NULL;
        format = argv[1];
    }
    else
    {
        file = argv[1];
        format = argv[2];
    }

    for(p = exports; *p; p += 2)
        if(!strcasecmp(format, *p))
            break;

    if(!*p)
    {
        fprintf(stderr, "%s: unknown format `%s'\n", argv[0], format);
        fprintf(stderr, "please use one of:\n");
        for(p = exports; *p; p += 2)
            fprintf(stderr, " \"%s\" (%s)\n", *p, *(p + 1));
        exit(-1);
    }

    if(file)
    {
        cv = caca_create_canvas(0, 0);
        if(caca_import_canvas_from_file(cv, file, "") < 0)
        {
            fprintf(stderr, "%s: `%s' has unknown format\n", argv[0], file);
            exit(-1);
        }
    }
    else
    {
        cv = caca_create_canvas(WIDTH, HEIGHT);

        for(y = 0; y < 256; y++)
        {
            for(x = 0; x < 256; x++)
            {
                uint32_t r = x;
                uint32_t g = (255 - y + x) / 2;
                uint32_t b = y * (255 - x) / 256;
                pixels[y * 256 + x] = (r << 16) | (g << 8) | (b << 0);
            }
        }

        dither = caca_create_dither(32, 256, 256, 4 * 256,
                                     0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
        if(!strcmp(format, "ansi") || !strcmp(format, "utf8"))
            caca_set_dither_charset(dither, "shades");
        caca_dither_bitmap(cv, 0, 0, caca_get_canvas_width(cv),
                            caca_get_canvas_height(cv), dither, pixels);
        caca_free_dither(dither);

        caca_set_color_ansi(cv, CACA_WHITE, CACA_BLACK);
        caca_draw_thin_box(cv, 0, 0, WIDTH - 1, HEIGHT - 1);

        caca_set_color_ansi(cv, CACA_BLACK, CACA_WHITE);
        caca_fill_ellipse(cv, WIDTH / 2, HEIGHT / 2,
                               WIDTH / 4, HEIGHT / 4, ' ');

        caca_set_color_ansi(cv, CACA_LIGHTGRAY, CACA_BLACK);
        caca_put_str(cv, WIDTH / 2 - 12, HEIGHT / 2 - 6,
                      "   lightgray on black   ");
        caca_set_color_ansi(cv, CACA_DEFAULT, CACA_TRANSPARENT);
        caca_put_str(cv, WIDTH / 2 - 12, HEIGHT / 2 - 5,
                      " default on transparent ");
        caca_set_color_ansi(cv, CACA_BLACK, CACA_WHITE);
        caca_put_str(cv, WIDTH / 2 - 12, HEIGHT / 2 - 4,
                      "     black on white     ");

        caca_set_color_ansi(cv, CACA_BLACK, CACA_WHITE);
        caca_put_str(cv, WIDTH / 2 - 8, HEIGHT / 2 - 3, "[<><><><> <>--<>]");
        caca_put_str(cv, WIDTH / 2 - 8, HEIGHT / 2 - 2, "[ドラゴン ボーレ]");
        caca_put_str(cv, WIDTH / 2 - 7, HEIGHT / 2 + 2, "äβç ░▒▓█▓▒░ ΔЗҒ");
        caca_put_str(cv, WIDTH / 2 - 5, HEIGHT / 2 + 4, "(\") \\o/ <&>");

        caca_set_attr(cv, CACA_BOLD);
        caca_put_str(cv, WIDTH / 2 - 16, HEIGHT / 2 + 3, "Bold");
        caca_set_attr(cv, CACA_BLINK);
        caca_put_str(cv, WIDTH / 2 - 9, HEIGHT / 2 + 3, "Blink");
        caca_set_attr(cv, CACA_ITALICS);
        caca_put_str(cv, WIDTH / 2 - 1, HEIGHT / 2 + 3, "Italics");
        caca_set_attr(cv, CACA_UNDERLINE);
        caca_put_str(cv, WIDTH / 2 + 8, HEIGHT / 2 + 3, "Underline");
        caca_set_attr(cv, 0);

        caca_set_color_ansi(cv, CACA_WHITE, CACA_LIGHTBLUE);
        caca_put_str(cv, WIDTH / 2 - 7, HEIGHT / 2, "    LIBCACA    ");

        for(x = 0; x < 16; x++)
        {
            caca_set_color_argb(cv, 0xff00 | x, 0xf00f | (x << 4));
            caca_put_char(cv, WIDTH / 2 - 7 + x, HEIGHT / 2 + 6, '#');
        }
    }

    buffer = caca_export_canvas_to_memory(cv, format, &len);
    fwrite(buffer, len, 1, stdout);
    free(buffer);

    caca_free_canvas(cv);

    return 0;
}
コード例 #10
0
ファイル: cacademo.c プロジェクト: zougloub/libcaca
void moire(enum action action, caca_canvas_t *cv)
{
    static caca_dither_t *dither;
    static uint8_t *screen;
    static float d[6];
    static uint32_t red[256], green[256], blue[256], alpha[256];

    int i, x, y;

    switch(action)
    {
    case PREPARE:
        /* Fill various tables */
        for(i = 0 ; i < 256; i++)
            red[i] = green[i] = blue[i] = alpha[i] = 0;

        for(i = 0; i < 6; i++)
            d[i] = ((float)caca_rand(50, 70)) / 1000.0;

        red[0] = green[0] = blue[0] = 0x777;
        red[1] = green[1] = blue[1] = 0xfff;

        /* Fill the circle */
        for(i = DISCSIZ * 2; i > 0; i -= DISCTHICKNESS)
        {
            int t, dx, dy;

            for(t = 0, dx = 0, dy = i; dx <= dy; dx++)
            {
                draw_line(dx / 3, dy / 3, (i / DISCTHICKNESS) % 2);
                draw_line(dy / 3, dx / 3, (i / DISCTHICKNESS) % 2);

                t += t > 0 ? dx - dy-- : dx;
            }
        }

        break;

    case INIT:
        screen = malloc(XSIZ * YSIZ * sizeof(uint8_t));
        dither = caca_create_dither(8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0);
        break;

    case UPDATE:
        memset(screen, 0, XSIZ * YSIZ);

        /* Set the palette */
        red[0] = 0.5 * (1 + sin(d[0] * (frame + 1000))) * 0xfff;
        green[0] = 0.5 * (1 + cos(d[1] * frame)) * 0xfff;
        blue[0] = 0.5 * (1 + cos(d[2] * (frame + 3000))) * 0xfff;

        red[1] = 0.5 * (1 + sin(d[3] * (frame + 2000))) * 0xfff;
        green[1] = 0.5 * (1 + cos(d[4] * frame + 5.0)) * 0xfff;
        blue[1] = 0.5 * (1 + cos(d[5] * (frame + 4000))) * 0xfff;

        caca_set_dither_palette(dither, red, green, blue, alpha);

        /* Draw circles */
        x = cos(d[0] * (frame + 1000)) * 128.0 + (XSIZ / 2);
        y = sin(0.11 * frame) * 128.0 + (YSIZ / 2);
        put_disc(screen, x, y);

        x = cos(0.13 * frame + 2.0) * 64.0 + (XSIZ / 2);
        y = sin(d[1] * (frame + 2000)) * 64.0 + (YSIZ / 2);
        put_disc(screen, x, y);
        break;

    case RENDER:
        caca_dither_bitmap(cv, 0, 0,
                           caca_get_canvas_width(cv),
                           caca_get_canvas_height(cv),
                           dither, screen);
        break;

    case FREE:
        free(screen);
        caca_free_dither(dither);
        break;
    }
}
コード例 #11
0
ファイル: cacademo.c プロジェクト: zougloub/libcaca
void metaballs(enum action action, caca_canvas_t *cv)
{
    static caca_dither_t *caca_dither;
    static uint8_t *screen;
    static uint32_t r[256], g[256], b[256], a[256];
    static float dd[METABALLS], di[METABALLS], dj[METABALLS], dk[METABALLS];
    static unsigned int x[METABALLS], y[METABALLS];
    static float i = 10.0, j = 17.0, k = 11.0;
    static double offset[360 + 80];
    static unsigned int angleoff;

    int n, angle;

    switch(action)
    {
    case PREPARE:
        /* Make the palette eatable by libcaca */
        for(n = 0; n < 256; n++)
            r[n] = g[n] = b[n] = a[n] = 0x0;
        r[255] = g[255] = b[255] = 0xfff;

        /* Generate ball sprite */
        create_ball();

        for(n = 0; n < METABALLS; n++)
        {
            dd[n] = caca_rand(0, 100);
            di[n] = (float)caca_rand(500, 4000) / 6000.0;
            dj[n] = (float)caca_rand(500, 4000) / 6000.0;
            dk[n] = (float)caca_rand(500, 4000) / 6000.0;
        }

        angleoff = caca_rand(0, 360);

        for(n = 0; n < 360 + 80; n++)
            offset[n] = 1.0 + sin((double)(n * M_PI / 60));
        break;

    case INIT:
        screen = malloc(XSIZ * YSIZ * sizeof(uint8_t));
        /* Create a libcaca dither smaller than our pixel buffer, so that we
         * display only the interesting part of it */
        caca_dither = caca_create_dither(8, XSIZ - METASIZE, YSIZ - METASIZE,
                                         XSIZ, 0, 0, 0, 0);
        break;

    case UPDATE:
        angle = (frame + angleoff) % 360;

        /* Crop the palette */
        for(n = CROPBALL; n < 255; n++)
        {
            int t1, t2, t3;
            double c1 = offset[angle];
            double c2 = offset[angle + 40];
            double c3 = offset[angle + 80];

            t1 = n < 0x40 ? 0 : n < 0xc0 ? (n - 0x40) * 0x20 : 0xfff;
            t2 = n < 0xe0 ? 0 : (n - 0xe0) * 0x80;
            t3 = n < 0x40 ? n * 0x40 : 0xfff;

            r[n] = (c1 * t1 + c2 * t2 + c3 * t3) / 4;
            g[n] = (c1 * t2 + c2 * t3 + c3 * t1) / 4;
            b[n] = (c1 * t3 + c2 * t1 + c3 * t2) / 4;
        }

        /* Set the palette */
        caca_set_dither_palette(caca_dither, r, g, b, a);

        /* Silly paths for our balls */
        for(n = 0; n < METABALLS; n++)
        {
            float u = di[n] * i + dj[n] * j + dk[n] * sin(di[n] * k);
            float v = dd[n] + di[n] * j + dj[n] * k + dk[n] * sin(dk[n] * i);
            u = sin(i + u * 2.1) * (1.0 + sin(u));
            v = sin(j + v * 1.9) * (1.0 + sin(v));
            x[n] = (XSIZ - METASIZE) / 2 + u * (XSIZ - METASIZE) / 4;
            y[n] = (YSIZ - METASIZE) / 2 + v * (YSIZ - METASIZE) / 4;
        }

        i += 0.011;
        j += 0.017;
        k += 0.019;

        memset(screen, 0, XSIZ * YSIZ);

        for(n = 0; n < METABALLS; n++)
            draw_ball(screen, x[n], y[n]);
        break;

    case RENDER:
        caca_dither_bitmap(cv, 0, 0,
                           caca_get_canvas_width(cv),
                           caca_get_canvas_height(cv),
                           caca_dither, screen + (METASIZE / 2) * (1 + XSIZ));
        break;

    case FREE:
        free(screen);
        caca_free_dither(caca_dither);
        break;
    }
}
コード例 #12
0
ファイル: cacademo.c プロジェクト: zougloub/libcaca
void plasma(enum action action, caca_canvas_t *cv)
{
    static caca_dither_t *dither;
    static uint8_t *screen;
    static uint32_t red[256], green[256], blue[256], alpha[256];
    static double r[3], R[6];

    int i, x, y;

    switch(action)
    {
    case PREPARE:
        /* Fill various tables */
        for(i = 0 ; i < 256; i++)
            red[i] = green[i] = blue[i] = alpha[i] = 0;

        for(i = 0; i < 3; i++)
            r[i] = (double)(caca_rand(1, 1000)) / 60000 * M_PI;

        for(i = 0; i < 6; i++)
            R[i] = (double)(caca_rand(1, 1000)) / 10000;

        for(y = 0 ; y < TABLEY ; y++)
            for(x = 0 ; x < TABLEX ; x++)
            {
                double tmp = (((double)((x - (TABLEX / 2)) * (x - (TABLEX / 2))
                                        + (y - (TABLEX / 2)) * (y - (TABLEX / 2))))
                              * (M_PI / (TABLEX * TABLEX + TABLEY * TABLEY)));

                table[x + y * TABLEX] = (1.0 + sin(12.0 * sqrt(tmp))) * 256 / 6;
            }
        break;

    case INIT:
        screen = malloc(XSIZ * YSIZ * sizeof(uint8_t));
        dither = caca_create_dither(8, XSIZ, YSIZ, XSIZ, 0, 0, 0, 0);
        break;

    case UPDATE:
        for(i = 0 ; i < 256; i++)
        {
            double z = ((double)i) / 256 * 6 * M_PI;

            red[i] = (1.0 + sin(z + r[1] * frame)) / 2 * 0xfff;
            blue[i] = (1.0 + cos(z + r[0] * (frame + 100))) / 2 * 0xfff;
            green[i] = (1.0 + cos(z + r[2] * (frame + 200))) / 2 * 0xfff;
        }

        /* Set the palette */
        caca_set_dither_palette(dither, red, green, blue, alpha);

        do_plasma(screen,
                  (1.0 + sin(((double)frame) * R[0])) / 2,
                  (1.0 + sin(((double)frame) * R[1])) / 2,
                  (1.0 + sin(((double)frame) * R[2])) / 2,
                  (1.0 + sin(((double)frame) * R[3])) / 2,
                  (1.0 + sin(((double)frame) * R[4])) / 2,
                  (1.0 + sin(((double)frame) * R[5])) / 2);
        break;

    case RENDER:
        caca_dither_bitmap(cv, 0, 0,
                           caca_get_canvas_width(cv),
                           caca_get_canvas_height(cv),
                           dither, screen);
        break;

    case FREE:
        free(screen);
        caca_free_dither(dither);
        break;
    }
}
コード例 #13
0
JNIEXPORT void JNICALL
Java_org_zoy_caca_Dither_freeDither(JNIEnv *env, jclass cls, jlong ptr)
{
  caca_free_dither((caca_dither_t *)ptr);
}
コード例 #14
0
ファイル: caca-dither.c プロジェクト: gitpan/Term-Caca
void dither_free(void *dither)
{
    caca_free_dither((caca_dither_t *)dither);
}