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/font.c

    r810 r811  
    260260 *  font. The pixel format is fixed (32-bit ARGB, 8 bits for each component).
    261261 *
    262  *  The required image width can be computed using \e cucul_get_width(c) and
     262 *  The required image width can be computed using \e cucul_get_width(cv) and
    263263 *  \e cucul_get_font_width(f). The required height can be computed using
    264  *  \e cucul_get_height(c) and \e cucul_get_font_height(f).
     264 *  \e cucul_get_height(cv) and \e cucul_get_font_height(f).
    265265 *
    266266 *  Glyphs that do not fit in the image buffer are currently not rendered at
    267267 *  all. They may be cropped instead in future versions.
    268268 *
    269  *  \param c The canvas to render
     269 *  \param cv The canvas to render
    270270 *  \param f The font, as returned by \e cucul_load_font()
    271271 *  \param buf The image buffer
     
    274274 *  \param pitch The pitch (in bytes) of an image buffer line.
    275275 */
    276 void cucul_render_canvas(cucul_canvas_t *c, cucul_font_t *f,
     276void cucul_render_canvas(cucul_canvas_t *cv, cucul_font_t *f,
    277277                         void *buf, unsigned int width,
    278278                         unsigned int height, unsigned int pitch)
     
    284284        glyph = malloc(f->header.width * f->header.height);
    285285
    286     if(width < c->width * f->header.width)
     286    if(width < cv->width * f->header.width)
    287287        xmax = width / f->header.width;
    288288    else
    289         xmax = c->width;
    290 
    291     if(height < c->height * f->header.height)
     289        xmax = cv->width;
     290
     291    if(height < cv->height * f->header.height)
    292292        ymax = height / f->header.height;
    293293    else
    294         ymax = c->height;
     294        ymax = cv->height;
    295295
    296296    for(y = 0; y < ymax; y++)
     
    301301            unsigned int starty = y * f->header.height;
    302302            unsigned int startx = x * f->header.width;
    303             uint32_t ch = c->chars[y * c->width + x];
    304             uint32_t attr = c->attr[y * c->width + x];
     303            uint32_t ch = cv->chars[y * cv->width + x];
     304            uint32_t attr = cv->attr[y * cv->width + x];
    305305            unsigned int b, i, j;
    306306            struct glyph_info *g;
Note: See TracChangeset for help on using the changeset viewer.