Browse Source

* Changed the buffer type in cucul_render_canvas() to void* to avoid

compilation warnings.
tags/v0.99.beta14
Sam Hocevar sam 19 years ago
parent
commit
c5b827a44e
2 changed files with 4 additions and 3 deletions
  1. +1
    -1
      cucul/cucul.h
  2. +3
    -2
      cucul/font.c

+ 1
- 1
cucul/cucul.h View File

@@ -200,7 +200,7 @@ cucul_font_t *cucul_load_font(void const *, unsigned int);
char const * const * cucul_get_font_list(void);
unsigned int cucul_get_font_width(cucul_font_t *);
unsigned int cucul_get_font_height(cucul_font_t *);
void cucul_render_canvas(cucul_t *, cucul_font_t *, unsigned char *,
void cucul_render_canvas(cucul_t *, cucul_font_t *, void *,
unsigned int, unsigned int, unsigned int);
void cucul_free_font(cucul_font_t *);
/* @} */


+ 3
- 2
cucul/font.c View File

@@ -274,7 +274,7 @@ void cucul_free_font(cucul_font_t *f)
* \param pitch The pitch (in bytes) of an image buffer line.
*/
void cucul_render_canvas(cucul_t *qq, cucul_font_t *f,
unsigned char *buf, unsigned int width,
void *buf, unsigned int width,
unsigned int height, unsigned int pitch)
{
uint8_t *glyph = NULL;
@@ -350,7 +350,8 @@ void cucul_render_canvas(cucul_t *qq, cucul_font_t *f,
/* Step 2: render glyph using colour attribute */
for(j = 0; j < g->height; j++)
{
uint8_t *line = buf + (starty + j) * pitch + 4 * startx;
uint8_t *line = buf;
line += (starty + j) * pitch + 4 * startx;

for(i = 0; i < g->width; i++)
{


Loading…
Cancel
Save