Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
OpenGL
TextTTF.h
Go to the documentation of this file.
1
#ifndef Hippo_TextTTF_h
2
#define Hippo_TextTTF_h
3
4
#include <vector>
5
#include <string>
6
7
class
TextTTF_Internal;
8
9
namespace
hippodraw {
10
24
class
TextTTF
{
25
public
:
26
enum
Justification
{
27
LEFT
= 0x01,
28
RIGHT
= 0x02,
29
CENTER
= 0x03,
30
BOTTOM
= 0x04,
31
MIDDLE
= 0x05,
32
TOP
= 0x06
33
};
34
enum
ViewportMapping
{
35
NONE
,
36
RESCALE
,
37
ADJUST
38
};
39
TextTTF
();
40
virtual
~TextTTF
();
41
void
setFileName
(
const
std::string&);
42
void
setString
(
const
std::string&);
43
void
setStrings
(
const
std::vector<std::string>&);
44
void
setSize
(
float
);
45
void
setJustification
(
Justification
,
Justification
);
46
void
setRotated
(
bool
);
47
void
render
();
48
private
:
49
bool
setup
();
50
void
renderString
(
const
std::string&);
51
void
renderCharacter
(
char
);
52
bool
getTextSizePixels
(
short
&,
short
&);
53
private
:
54
// Fields
55
std::string
m_fileName
;
56
std::vector<std::string>
m_strings
;
57
float
m_size
;
58
Justification
m_horizontalJustification
;
59
Justification
m_verticalJustification
;
60
ViewportMapping
m_viewportMapping
;
61
62
TextTTF_Internal*
fTTF
;
63
bool
fStatus
;
64
void
initFont
();
65
bool
fInitFont
;
66
int
fPointSize
;
67
int
fViewportWidth
;
68
int
fViewportHeight
;
69
bool
fRotated
;
70
};
71
72
}
// end namespace hippodraw
73
74
#endif
Generated for HippoDraw Class Library by