Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/sfont/fontset.h @ 3456

Last change on this file since 3456 was 3456, checked in by bensch, 19 years ago

orxonox/trunk: FontSet addapted the fontset some more
doxygen-tags
name

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
12class Texture;
13
14//! A class to handle a FontSet.
15/**
16   A fontset is an entire Alphabet (256 entries) of one font.
17   It is made by creating a file containing a matrix with 256
18   little pictures in it, displaying the letters of this alphabet.
19   Then these letters are projected onto Quads, which can be aranged
20   in a sorted order, to display some text
21
22   usage:
23   1. initialize the Class by loading the source-font-picture
24   2. set the size
25   3. write some text with printText
26   4. delete the class again.
27*/ 
28class FontSet
29{
30 public:
31  FontSet();
32  FontSet(char *file);
33  ~FontSet();
34 
35  int buildFont(char* fontFile);
36  int printText(int x, int y, char type, char *fmt, ...);
37  int killFont(void);
38  int setSize(float x, float y);
39 
40 private:
41  int base;          //!< Save the glLists here.
42  float sizex;       //!< the width of the text.
43  float sizey;       //!< the height of the text.
44  Texture* font;     //!< texture of the font.
45
46};
Note: See TracBrowser for help on using the repository browser.