MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoView2D/View2DFontFTGL.h
Go to the documentation of this file.
00001 #ifndef __View2DFontFTGL_H
00002 #define __View2DFontFTGL_H
00003 //----------------------------------------------------------------------------------
00004 // **InsertLicense** code
00005 //----------------------------------------------------------------------------------
00007 
00013 //----------------------------------------------------------------------------------
00014 
00015 #include "View2DFont.h"
00016 #include "mlGL2DFont.h"
00017 
00019 class SOVIEW2D_API View2DFontFTGL : public View2DFont {
00020 
00021 public:
00022   View2DFontFTGL();
00023   virtual ~View2DFontFTGL();
00024 
00027   virtual bool   init(const char* fontname = NULL);
00028 
00030   virtual int    getFontHeight(float fontSize) const;
00031 
00033   virtual int    getFontAscender(float fontSize) const;
00034 
00036   virtual int    getFontDescender(float fontSize) const;
00037 
00039   virtual int    getStringWidth(float fontSize, const char* string, int len) const;
00040 
00042   virtual void   drawString(float dx, float dy, float fontSize, const float* color, const char* string, int length, bool shadow=true);
00043 
00044 private:
00045   ML_OPENGL_NAMESPACE::GL2DFont *_font;
00046 };
00047 
00048 #endif