Revision 188
many changes
font.h | ||
---|---|---|
1 | 1 |
#ifndef FONT_H_INCLUDED |
2 | 2 |
#define FONT_H_INCLUDED |
3 | 3 |
|
4 |
enum text_valign{ |
|
5 |
text_valign_top = -1, |
|
6 |
text_valign_center = 0, |
|
7 |
text_valign_bottom = 1 |
|
8 |
}; |
|
9 |
|
|
10 |
enum text_halign{ |
|
11 |
text_halign_left = -1, |
|
12 |
text_halign_center = 0, |
|
13 |
text_halign_right = 1 |
|
14 |
}; |
|
15 |
|
|
4 | 16 |
struct font; |
5 | 17 |
typedef struct font font_t; |
6 | 18 |
font_t* (font_ctor)(const char *s); |
... | ... | |
10 | 22 |
typedef struct text text_t; |
11 | 23 |
text_t* (text_ctor)(const font_t *fnt, const char *txt); |
12 | 24 |
void (text_dtor)(text_t *p); |
13 |
void (text_set_text) (text_t *p, const char *txt); |
|
14 |
void (text_set_pos) (text_t *p, int16_t x, int16_t y); |
|
15 |
void (text_set_size) (text_t *p, unsigned size); |
|
16 |
void (text_set_color)(text_t *p, uint32_t color); |
|
17 |
void (text_draw) (const text_t *p); |
|
25 |
void (text_set_text) (text_t *p, const char *txt); |
|
26 |
void (text_set_pos) (text_t *p, int16_t x, int16_t y); |
|
27 |
void (text_set_size) (text_t *p, unsigned size); |
|
28 |
void (text_set_color) (text_t *p, uint32_t color); |
|
29 |
void (text_set_valign)(text_t *p, enum text_valign valign); |
|
30 |
void (text_set_halign)(text_t *p, enum text_halign halign); |
|
31 |
int (text_draw) (const text_t *p); |
|
18 | 32 |
|
19 | 33 |
#endif //FONT_H_INCLUDED |
Also available in: Unified diff