]> git.lizzy.rs Git - nothing.git/blob - src/game/sprite_font.h
(#263) Improve easing for tutorial labels animation
[nothing.git] / src / game / sprite_font.h
1 #ifndef SPRITE_FONT_H_
2 #define SPRITE_FONT_H_
3
4 #include "color.h"
5 #include "math/point.h"
6 #include "math/rect.h"
7
8 typedef struct sprite_font_t sprite_font_t;
9
10 sprite_font_t *create_sprite_font_from_file(const char *bmp_file_path,
11                                             SDL_Renderer *renderer);
12 void destroy_sprite_font(sprite_font_t *sprite_font);
13
14 int sprite_font_render_text(const sprite_font_t *sprite_font,
15                             SDL_Renderer *renderer,
16                             vec_t position,
17                             vec_t size,
18                             color_t color,
19                             const char *text);
20
21 rect_t sprite_font_boundary_box(const sprite_font_t *sprite_font,
22                                 vec_t position,
23                                 vec_t size,
24                                 const char *text);
25
26 #endif  // SPRITE_FONT_H_