diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/font.c | 6 | ||||
-rw-r--r-- | src/font.h | 6 | ||||
-rw-r--r-- | src/image.c | 3 | ||||
-rw-r--r-- | src/image.h | 3 | ||||
-rw-r--r-- | src/text.c | 6 | ||||
-rw-r--r-- | src/text.h | 6 |
6 files changed, 16 insertions, 14 deletions
@@ -65,19 +65,19 @@ font_find(const char *name) } int -font_get_width(struct font *font) +font_get_width(const struct font *font) { return font->desc.width; } int -font_get_height(struct font *font) +font_get_height(const struct font *font) { return font->desc.height; } void -font_render(struct font *font, png_const_colorp fg, png_const_colorp bg, +font_render(const struct font *font, png_const_colorp fg, png_const_colorp bg, unsigned char ch, png_bytepp rows, int row, int col) { size_t y; @@ -30,13 +30,13 @@ struct font * font_find(const char *name) __attribute__((pure)); int -font_get_width(struct font *font) __attribute__((pure)); +font_get_width(const struct font *font) __attribute__((pure)); int -font_get_height(struct font *font) __attribute__((pure)); +font_get_height(const struct font *font) __attribute__((pure)); void -font_render(struct font *font, png_const_colorp fg, png_const_colorp bg, +font_render(const struct font *font, png_const_colorp fg, png_const_colorp bg, unsigned char ch, png_bytepp rows, int row, int col); #endif /* FONT_H_ */ diff --git a/src/image.c b/src/image.c index 3c5d98f..e55f955 100644 --- a/src/image.c +++ b/src/image.c @@ -76,7 +76,8 @@ image_new(const char *file_name) } void -image_render(struct image *image, struct text *text, struct font *font) +image_render(struct image *image, const struct text *text, + const struct font *font) { size_t width; size_t height; diff --git a/src/image.h b/src/image.h index b303c23..ece53f7 100644 --- a/src/image.h +++ b/src/image.h @@ -38,7 +38,8 @@ struct image * image_new(const char *file_name); void -image_render(struct image *image, struct text *text, struct font *font); +image_render(struct image *image, const struct text *text, + const struct font *font); struct image * image_destroy(struct image **image); @@ -105,13 +105,13 @@ text_new(FILE *stream) } size_t -text_get_width(struct text *text) +text_get_width(const struct text *text) { return text->width; } size_t -text_get_height(struct text *text) +text_get_height(const struct text *text) { return text->height; } @@ -129,7 +129,7 @@ text_set_height(struct text *text, size_t height) } void -text_render(struct text *text, struct font *font, png_bytepp rows) +text_render(const struct text *text, const struct font *font, png_bytepp rows) { unsigned char *string_start; unsigned char *string; @@ -34,10 +34,10 @@ struct text * text_new(FILE *stream); size_t -text_get_width(struct text *text) __attribute__((pure)); +text_get_width(const struct text *text) __attribute__((pure)); size_t -text_get_height(struct text *text) __attribute__((pure)); +text_get_height(const struct text *text) __attribute__((pure)); size_t text_set_width(struct text *text, size_t width); @@ -46,7 +46,7 @@ size_t text_set_height(struct text *text, size_t height); void -text_render(struct text *text, struct font *font, png_bytepp rows); +text_render(const struct text *text, const struct font *font, png_bytepp rows); struct text * text_destroy(struct text **text_p); |