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

NiceText.H

Go to the documentation of this file.
00001 /**************************************************************
00002  *  Name: Sascha Becker (sab)
00003  *  File: NiceText.H
00004  *  Asgn: cavewriting
00005  *  Date: Fri Dec 24 14:28:50 EST 2004
00006  **************************************************************/
00007 
00008 #ifndef NiceText_Header
00009 #define NiceText_Header
00010 
00011 #include <DrawObj.H>
00012 #include <IS3D.H>
00013 #include "FTGLExtrdFont.h"
00014 #include "FTGLOutlineFont.h"
00015 #include "FTGLPolygonFont.h"
00016 #include "FTGLTextureFont.h"
00017 #include "FTGLPixmapFont.h"
00018 #include "FTGLBitmapFont.h"
00019 
00020 using namespace std;
00021 
00022 typedef ReferenceCountedPointer<class NiceText> NiceTextRef; 
00023 
00024 class NiceText : public IS3D::DrawObj 
00025 {
00026 public:
00027   NiceText(const string& configName, 
00028        const string& text, 
00029        Color4 color = Color4(1, 1, 1, 1),
00030        FTFont* font = NULL);
00031   virtual ~NiceText();
00032 
00033   void setColor(Color4 color) {_color = color; }
00034   Color4 getColor() { return _color; }
00035 
00036   double getWidth(); 
00037   double getHeight(); 
00038   
00039   void draw();
00040 
00041   void setText(const string& text) { _text = text; }
00042 
00043 protected:
00044   string _text; 
00045   FTFont * _font;
00046   Color4  _color; 
00047   double _scaleFactor; 
00048 };
00049 
00050 
00051 #endif

Generated on Sun Apr 17 13:34:27 2005 for cavewriting by  doxygen 1.4.0