Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/James/ZEngine-dev/include/ZE_ZFont.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002          This file is Part of the ZEngine Library for SDL Game Development.
00003                       Copyright (C) 2002 ConceptOfZero.net
00004 
00005              Licensed under the BSD License, see licensing.txt.
00006 
00007     The maintainer of this library is James Turk (jturk@conceptofzero.net) 
00008          and the home of this Library is http://www.conceptofzero.net/
00009 *******************************************************************************/
00010 
00024 #ifndef __ze_zfont_h__
00025 #define __ze_zfont_h__
00026 
00027 #include "ZE_ZObject.h"
00028 #include "ZE_ZImage.h"
00029 
00030 #ifdef USE_SDL_TTF
00031 
00032 namespace ZE
00033 {
00034 
00040 class ZFont : public ZObject
00041 {
00042         protected:
00044                 FontData rFont;
00046                 SDL_Color rColor;
00048                 SDL_Color rBGColor;
00049 
00050         public:
00051 
00053                 //Opening and Closing//
00055 
00061                 ZFont();
00062 
00070                 ZFont(string filename, int size);
00071 
00077                 ~ZFont();
00078 
00086                 void Open(string filename, int size);
00087 
00093                 void Release();
00094 
00096                 //Settings and Drawing//
00098 
00106                 void DrawText(string text, ZImage &image);
00107 
00115                 void DrawShadedText(string text, ZImage &image);
00116 
00125                 void SetColor(Uint8 r, Uint8 g, Uint8 b);
00126 
00135                 void SetBGColor(Uint8 r, Uint8 g, Uint8 b);
00136 
00145                 void SetStyle(bool bold, bool italic, bool underline);
00146 
00153                 void Resize(int size);
00154 
00156                 //Accessors//
00158 
00165                 bool IsLoaded();
00166 
00173                 bool IsBold();
00174 
00181                 bool IsItalic();
00182 
00189                 bool IsUnderlined();
00190 
00197                 int GetHeight();
00198 
00205                 int GetLineSkip();
00206 
00214                 int GetStringWidth(string text);
00215 
00223                 int GetStringHeight(string text);
00224 };
00225 
00226 }
00227 
00228 #endif //USE_SDL_TTF
00229 
00230 #endif //__ze_zfont_h__

Generated on Wed Nov 20 01:18:05 2002 for ZEngine by doxygen1.3-rc1