-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathText.h
46 lines (35 loc) · 1.66 KB
/
Text.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _TEXT_H
#define _TEXT_H
class Text {
public:
void load_all();
void clear_all();
SDL_Surface * render_glyph_small(const char g);
SDL_Surface * render_glyph_medium(const char g);
SDL_Surface * render_glyph_large(const char g);
SDL_Surface * render_glyph_small_gray(const char g);
SDL_Surface * render_glyph_medium_gray(const char g);
SDL_Surface * render_glyph_large_gray(const char g);
SDL_Surface * render_glyph_small_shadow(const char g);
SDL_Surface * render_glyph_medium_shadow(const char g);
SDL_Surface * render_glyph_large_shadow(const char g);
SDL_Surface * render_text_small(const char * t);
SDL_Surface * render_text_medium(const char * t);
SDL_Surface * render_text_large(const char * t);
SDL_Surface * render_text_small_gray(const char * t);
SDL_Surface * render_text_medium_gray(const char * t);
SDL_Surface * render_text_large_gray(const char * t);
SDL_Surface * render_text_small_shadow(const char * t);
SDL_Surface * render_text_medium_shadow(const char * t);
SDL_Surface * render_text_large_shadow(const char * t);
private:
SDL_Surface * font_small;
SDL_Surface * font_medium;
SDL_Surface * font_large;
SDL_Surface * render_glyph(SDL_Surface * font, int w, int h, const char g, bool gray);
SDL_Surface * render_text(SDL_Surface * font, int w, int h, int spacing, const char * t, bool gray);
SDL_Surface * render_glyph_shadow(SDL_Surface * font, int w, int h, const char g, int offx, int offy);
SDL_Surface * render_text_shadow(SDL_Surface * font, int w, int h, int spacing, const char * t, int offx, int offy);
SDL_Rect * glyph_clip(int w, int h, const char g, bool gray);
};
#endif