00001 #ifndef MX_TTF_H_
00002 #define MX_TTF_H_
00003 #include "SDL.h"
00004 #include "SDL_ttf.h"
00005 #include<string>
00006 #include"mxsurface.h"
00007
00008 namespace mx
00009 {
00010
00012 class mxTTF_Font {
00013
00014 public:
00019 explicit mxTTF_Font(std::string font_name, int font_size);
00022 ~mxTTF_Font();
00023
00029 SDL_Surface *renderText(std::string text, SDL_Color col);
00030
00036 void renderText(mxSurface &surface, std::string text, SDL_Color col);
00037
00038
00040 static void Init() {
00041 if(!TTF_WasInit())
00042 TTF_Init();
00043 }
00045 static void Quit() {
00046 TTF_Quit();
00047 }
00048 private:
00049 TTF_Font *font;
00050 mxTTF_Font &operator=(const mxTTF_Font &);
00051 mxTTF_Font(const mxTTF_Font &);
00052 };
00053 }
00054 #endif
00055
00056