torcs - 1.2.2

src/libs/tgfclient/guifont.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                         guifont.h -- Interface file for guifont                          
00003                              -------------------                                         
00004     created              : Fri Aug 13 22:20:04 CEST 1999
00005     copyright            : (C) 1999 by Eric Espie                         
00006     email                : torcs@free.fr   
00007     version              : $Id: guifont.h,v 1.2 2003/06/24 21:02:25 torcs Exp $                                  
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018  
00019 #ifndef _GUIFONT_H_
00020 #define _GUIFONT_H_
00021 
00022 //glFont character structure (DO NOT MODIFY)
00023 typedef struct
00024 {
00025     float dx, dy;
00026     float tx1, ty1;
00027     float tx2, ty2;
00028 } GLFONTCHAR;
00029 
00030 //glFont structure (DO NOT MODIFY)
00031 typedef struct
00032 {
00033     uint Tex;
00034     int TexWidth, TexHeight;
00035     int IntStart, IntEnd;
00036     GLFONTCHAR *Char;
00037 } GLFONT;
00038 
00039 class GfuiFontClass
00040 {
00041 protected:
00042     GLFONT      *font;
00043     float       size;
00044 
00045 public:
00046   GfuiFontClass(char *font);
00047 
00048   ~GfuiFontClass();
00049 
00050   void create(int point_size);
00051 
00052   void output(int x, int y, const char* text);
00053 
00054   int getWidth(const char* text);
00055   int getHeight() const;
00056   int getDescender() const;
00057 };
00058 
00059 extern GfuiFontClass    *gfuiFont[];
00060 
00061 #endif /* _GUIFONT_H_ */ 
00062 
00063 
00064 

Generated at Thu Feb 26 21:52:28 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.