Ignore:
Timestamp:
Apr 18, 2006, 5:11:25 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Renamed caca_t into caca_display_t.
  • Renamed canvas handle variables from "c" to "cv". Eh ouais mon gros.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/dither.c

    r810 r811  
    694694 *  and will be stretched to the text area.
    695695 *
    696  *  \param c A handle to the libcucul canvas.
     696 *  \param cv A handle to the libcucul canvas.
    697697 *  \param x1 X coordinate of the upper-left corner of the drawing area.
    698698 *  \param y1 Y coordinate of the upper-left corner of the drawing area.
     
    702702 *  \param pixels Bitmap's pixels.
    703703 */
    704 void cucul_dither_bitmap(cucul_canvas_t *c, int x1, int y1, int x2, int y2,
     704void cucul_dither_bitmap(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
    705705                         cucul_dither_t const *d, void *pixels)
    706706{
     
    731731    dchmax = d->glyph_count;
    732732
    733     fs_length = ((int)c->width <= x2 ? (int)c->width : x2) + 1;
     733    fs_length = ((int)cv->width <= x2 ? (int)cv->width : x2) + 1;
    734734    floyd_steinberg = malloc(3 * (fs_length + 2) * sizeof(int));
    735735    memset(floyd_steinberg, 0, 3 * (fs_length + 2) * sizeof(int));
     
    738738    fs_b = fs_g + fs_length + 2;
    739739
    740     for(y = y1 > 0 ? y1 : 0; y <= y2 && y <= (int)c->height; y++)
     740    for(y = y1 > 0 ? y1 : 0; y <= y2 && y <= (int)cv->height; y++)
    741741    {
    742742        int remain_r = 0, remain_g = 0, remain_b = 0;
    743743
    744744        for(x = x1 > 0 ? x1 : 0, d->init_dither(y);
    745             x <= x2 && x <= (int)c->width;
     745            x <= x2 && x <= (int)cv->width;
    746746            x++)
    747747    {
     
    937937
    938938        /* Now output the character */
    939         cucul_set_color(c, outfg, outbg);
    940         cucul_putstr(c, x, y, outch);
     939        cucul_set_color(cv, outfg, outbg);
     940        cucul_putstr(cv, x, y, outch);
    941941
    942942       d->increment_dither();
Note: See TracChangeset for help on using the changeset viewer.