blob: e2f85c7192f0847333908b7bc32a1a3e88a96781 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef RENDER_TEXT_H
#define RENDER_TEXT_H
#include <SDL2/SDL.h>
typedef struct {
SDL_Texture *tex;
SDL_Texture *tex_small;
int cw[128];
} txtd;
void char_width_init (int *char_width);
int get_text_width (char str[], txtd *t);
void render_text (SDL_Renderer* gRenderer, char str[], float off[], txtd *t);
void render_text_scaled (SDL_Renderer* gRenderer, char str[],
float off[], txtd *t, float scale);
void render_text_small (SDL_Renderer* rend, char str[], float off[], txtd *t);
#endif
|