Main Page | Namespace List | Class List | File List | Class Members | File Members

video_fonts.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   NGT (Neopontec Gaming Toolkit                                         *
00003  *   Distributed under the terms of the GNU LGPL License                   *
00004  *   Copyright (C) 2005 by Hector Blanco de Frutos                         *
00005  *   hectorblanco@neopontec.com                                            *
00006  *   Refer to the LICENSE file to read the full license agreement          *
00007  ***************************************************************************/
00008  
00009 #ifndef VIDEO_FONTS_H_
00010 #define VIDEO_FONTS_H_
00011         
00012         // Text drawing effects
00013         #define TEXT_NONE 0
00014         #define TEXT_BLENDED 1
00015         #define TEXT_SHADED 2
00016         
00017         #include "../ngt.h"
00018         #include <string>
00019         
00020         using namespace std;
00021 
00023 
00026         class NGT_Font{
00027                 public:
00029                         string filename;
00031                         int size;
00033 
00039                         int mode;
00041                         int x;
00043                         int y;
00045                         SDL_Color color;
00047                         void draw(string text, SDL_Surface *screen, int draw_x, int draw_y);
00049                         void draw(string text, SDL_Surface *scr);
00051                         void free() { TTF_CloseFont(font); };
00052                         // Constructors
00053                         NGT_Font() {};
00055                         NGT_Font(string filename, int size);
00057                         int LoadTTF(string filename, int size);
00059                         int LoadTTF();
00060                 private:
00062                         TTF_Font *font;
00063         };
00064 
00065 #endif /*VIDEO_FONTS_H_*/

Generated on Wed Feb 1 00:07:07 2006 for Neopntec Gaming Toolkit - API reference by  doxygen 1.4.4