-
Notifications
You must be signed in to change notification settings - Fork 1
/
font.h
46 lines (37 loc) · 1 KB
/
font.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 __FONT_H__
#define __FONT_H__
#include <string>
#include <SDL/SDL_opengl.h>
#include <SDL/SDL.h>
#include <cstdlib>
using namespace std;
class Font
{
private:
GLuint* m_pTextures;
GLuint m_iListBase;
string alias;
string filename;
int m_iSize;
double NORMAL_TEX_INTERVAL;
double WIDE_TEX_INTERVAL;
double LARGE_TEX_INTERVAL;
double SMALL_TEX_INTERVAL;
double HEIGHT_TEX_INTERVAL;
void print(float x, float y, const char* fmt, ...);
public:
Font();
Font(string alias);
void init(string filename, int _size);
void clean();
string getAlias();
string getFilename();
int getSize();
void setFontSize(int _iSize);
void drawText(string text, double x, double y);
void drawText(int numText, double x, double y);
void drawText(unsigned int numText, double x, double y);
void drawText(double numText, double x,
double y);
};
#endif