TORCS  1.3.9
The Open Racing Car Simulator
guifont.h
Go to the documentation of this file.
1 /***************************************************************************
2  guifont.h -- Interface file for guifont
3  -------------------
4  created : Fri Aug 13 22:20:04 CEST 1999
5  copyright : (C) 1999 by Eric Espie
6  email : torcs@free.fr
7  version : $Id$
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef _GUIFONT_H_
20 #define _GUIFONT_H_
21 
22 //glFont character structure (DO NOT MODIFY)
23 typedef struct
24 {
25  float dx, dy;
26  float tx1, ty1;
27  float tx2, ty2;
28 } GLFONTCHAR;
29 
30 //glFont structure (DO NOT MODIFY)
31 typedef struct
32 {
33  uint Tex;
34  int TexWidth, TexHeight;
35  int IntStart, IntEnd;
37 } GLFONT;
38 
40 {
41 protected:
43  float size;
44 
45 public:
46  GfuiFontClass(char *font);
47 
49 
50  void create(int point_size);
51 
52  void output(int x, int y, const char* text);
53 
54  int getWidth(const char* text);
55  int getHeight() const;
56  int getDescender() const;
57 };
58 
59 extern GfuiFontClass *gfuiFont[];
60 
61 #endif /* _GUIFONT_H_ */
62 
63 
64 
GLFONTCHAR * Char
Definition: guifont.h:36
void output(int x, int y, const char *text)
Definition: guifont.cpp:280
int TexWidth
Definition: guifont.h:34
void create(int point_size)
Definition: guifont.cpp:211
float size
Definition: guifont.h:43
uint Tex
Definition: guifont.h:33
GfuiFontClass * gfuiFont[]
Definition: guifont.cpp:43
static Vector y[4]
Definition: Convex.cpp:56
int getHeight() const
Definition: guifont.cpp:261
float ty2
Definition: guifont.h:27
Definition: guifont.h:31
float dy
Definition: guifont.h:25
GfuiFontClass(char *font)
Definition: guifont.cpp:104
float ty1
Definition: guifont.h:26
int IntStart
Definition: guifont.h:35
int getWidth(const char *text)
Definition: guifont.cpp:222
GLFONT * font
Definition: guifont.h:42
int getDescender() const
Definition: guifont.cpp:272