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

Font.h

00001 00002 00003 #ifndef MOD_FONT_H 00004 #define MOD_FONT_H 00005 00006 //Licence: LGPL 00007 //Copyright: Visti Andresen 00008 00009 #include <string> 00010 #include <GL/gl.h> 00011 #include <GL/glu.h> 00012 00013 using namespace std; 00014 00015 /**An interface defining the methods that can be used on a Font.*/ 00016 class Font 00017 { 00018 public: 00019 /**Destructor.*/ 00020 virtual ~Font(){}; 00021 /**Prepares the display for drawing of letters, you may have to prepare 00022 the display for drawing other things after this cal.*/ 00023 virtual void prepareDrawing() = 0; 00024 /**Writes a character data at x,y with the given zoom factor. 00025 prepareDrawing must have been called first.*/ 00026 virtual void printChar(const char data, float x, float y, float zoom) = 0; 00027 /**Writes a string value at x,y with the given zoom factor. 00028 prepareDrawing must have been called first.*/ 00029 virtual void printString(const string &value, float x, float y, float zoom) = 0; 00030 /**Returns the width of a string data at zoom factor zoom.*/ 00031 virtual float getWidth(const string &data, float zoom) = 0; 00032 /**Returns the height of the font at zoom factor zoom.*/ 00033 virtual float getHeight(float zoom) = 0; 00034 private: 00035 }; 00036 00037 #endif

Generated on Wed Sep 1 14:46:57 2004 by doxygen 1.3.7