Last change
on this file since 3791 was
3499,
checked in by chris, 20 years ago
|
orxonox/branches/levelloader: merged updated trunk structure into levelloader branch
|
File size:
1.2 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file fontset.h |
---|
3 | \brief Handles the display of Text. |
---|
4 | */ |
---|
5 | |
---|
6 | /** |
---|
7 | This file is extended to the needs of the orxonox-project. |
---|
8 | The main difference to the version of Marius is, that textures get |
---|
9 | loaded by orxonox Texture-class |
---|
10 | */ |
---|
11 | |
---|
12 | #ifndef _FONTSET_H |
---|
13 | #define _FONTSET_H |
---|
14 | |
---|
15 | class Texture; |
---|
16 | |
---|
17 | //! A class to handle a FontSet. |
---|
18 | /** |
---|
19 | A fontset is an entire Alphabet (256 entries) of one font. |
---|
20 | It is made by creating a file containing a matrix with 256 |
---|
21 | little pictures in it, displaying the letters of this alphabet. |
---|
22 | Then these letters are projected onto Quads, which can be aranged |
---|
23 | in a sorted order, to display some text |
---|
24 | |
---|
25 | usage: |
---|
26 | 1. initialize the Class by loading the source-font-picture |
---|
27 | 2. set the size |
---|
28 | 3. write some text with printText |
---|
29 | 4. delete the class again. |
---|
30 | */ |
---|
31 | class FontSet |
---|
32 | { |
---|
33 | public: |
---|
34 | FontSet(); |
---|
35 | FontSet(char *file); |
---|
36 | ~FontSet(); |
---|
37 | |
---|
38 | int buildFont(char* fontFile); |
---|
39 | int printText(int x, int y, char type, char *fmt, ...); |
---|
40 | int killFont(void); |
---|
41 | int setSize(float x, float y); |
---|
42 | |
---|
43 | private: |
---|
44 | int base; //!< Save the glLists here. |
---|
45 | float sizex; //!< the width of the text. |
---|
46 | float sizey; //!< the height of the text. |
---|
47 | Texture* font; //!< texture of the font. |
---|
48 | |
---|
49 | }; |
---|
50 | |
---|
51 | |
---|
52 | #endif /* _FONTSET_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.