blob: 322d3ea586d9c7ce9982535c6ba3d02a5bec2409 (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#ifndef __LUAFTGL_H__
#define __LUAFTGL_H__
#include <FTGL/ftgl.h>
#include <Exceptions.h>
#include <BLua.h>
class EncapFTFont : public Base {
public:
EncapFTFont(FTFont * _f) : f(_f) { }
~EncapFTFont() { delete f; }
FTFont * Get() { return f; }
private:
FTFont * f;
};
class EncapFTGLExtrdFont : public EncapFTFont {
public:
EncapFTGLExtrdFont(const char * path) : EncapFTFont(new FTGLExtrdFont(path)) { }
EncapFTGLExtrdFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLExtrdFont(buff, siz)) { }
};
class EncapFTGLOutlineFont : public EncapFTFont {
public:
EncapFTGLOutlineFont(const char * path) : EncapFTFont(new FTGLOutlineFont(path)) { }
EncapFTGLOutlineFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLOutlineFont(buff, siz)) { }
};
class EncapFTGLPolygonFont : public EncapFTFont {
public:
EncapFTGLPolygonFont(const char * path) : EncapFTFont(new FTGLPolygonFont(path)) { }
EncapFTGLPolygonFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLPolygonFont(buff, siz)) { }
};
class EncapFTGLTextureFont : public EncapFTFont {
public:
EncapFTGLTextureFont(const char * path) : EncapFTFont(new FTGLTextureFont(path)) { }
EncapFTGLTextureFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLTextureFont(buff, siz)) { }
};
class EncapFTGLPixmapFont : public EncapFTFont {
public:
EncapFTGLPixmapFont(const char * path) : EncapFTFont(new FTGLPixmapFont(path)) { }
EncapFTGLPixmapFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLPixmapFont(buff, siz)) { }
};
class EncapFTGLBitmapFont : public EncapFTFont {
public:
EncapFTGLBitmapFont(const char * path) : EncapFTFont(new FTGLBitmapFont(path)) { }
EncapFTGLBitmapFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLBitmapFont(buff, siz)) { }
};
class LuaFTFont : public LuaObject {
public:
static void pushstatics(Lua *) throw (GeneralException);
LuaFTFont(EncapFTFont * _f) : f(_f) { }
~LuaFTFont() { }
private:
virtual void pushmembers(Lua *);
EncapFTFont * f;
};
#endif
|