| 
    MeVisLab Toolbox Reference
    
   | 
 
Abstract GL font drawing using FTGL. More...
#include <View2DFontFTGL.h>
  
Public Member Functions | |
| View2DFontFTGL () | |
| ~View2DFontFTGL () override | |
| bool | init (const char *fontname=nullptr) override | 
| init with given font (either just a font name without .ttf or an absolute path) requires a valid GL context!   | |
| int | getFontHeight (float fontSize) const override | 
| get height of font (ascender + descender)   | |
| int | getFontAscender (float fontSize) const override | 
| get ascender of font   | |
| int | getFontDescender (float fontSize) const override | 
| get descender of font   | |
| int | getStringWidth (float fontSize, const char *string, int len=-1) const override | 
| get width of simple string   | |
| void | drawString (float dx, float dy, float fontSize, const float *color, const char *string, int length, bool shadow=true, const float *shadowColor=nullptr, bool flipped=false) override | 
draws a simple string with no linefeeds, the drawing starts at the top-left corner color needs to point to a float[4] array (RGBA) shadowColor is optional and needs to point to a float[3] array (RGB), alpha is taken from color.   | |
  Public Member Functions inherited from View2DFont | |
| View2DFont () | |
| virtual | ~View2DFont () | 
| void | drawStringFlipped (float dx, float dy, float fontSize, const float *color, const char *string, int length, bool shadow=true, const float *shadowColor=nullptr) | 
| as above for drawing a string up-side down where you don't need to specify all parameters   | |
| virtual void | getTextSize (float fontSize, const char *text, int &width, int &height, float lineSpacing=0.0f) const | 
| returns size of the box spanned by text box   | |
| virtual void | drawText (float dx, float dy, float fontSize, const float *color, const char *text, AlignXMode mode, bool shadow=true, float lineSpacing=0.0f, const float *shadowColor=nullptr) | 
| draws a multi-line text, lines are separated by  , the drawing starts in the top-left corner.  | |
Additional Inherited Members | |
  Public Types inherited from View2DFont | |
| enum | AlignXMode { ALIGN_LEFT , ALIGN_RIGHT , ALIGN_CENTER } | 
| align mode of multi-line text  More... | |
  Static Public Member Functions inherited from View2DFont | |
| static View2DFont * | globalFont () | 
| get the global font used for annotations etc. (only call this within a valid GL context!)   | |
| static View2DFont * | createFont (const char *fontname=nullptr) | 
| create a new font object with the given font name (/see init).   | |
Abstract GL font drawing using FTGL.
FTGL based implementation of View2DFont
Definition at line 22 of file View2DFontFTGL.h.
| View2DFontFTGL::View2DFontFTGL | ( | ) | 
      
  | 
  override | 
      
  | 
  overridevirtual | 
draws a simple string with no linefeeds, the drawing starts at the top-left corner color needs to point to a float[4] array (RGBA) shadowColor is optional and needs to point to a float[3] array (RGB), alpha is taken from color. 
Implements View2DFont.
      
  | 
  overridevirtual | 
get ascender of font
Implements View2DFont.
      
  | 
  overridevirtual | 
get descender of font
Implements View2DFont.
      
  | 
  overridevirtual | 
get height of font (ascender + descender)
Implements View2DFont.
      
  | 
  overridevirtual | 
get width of simple string
Implements View2DFont.
      
  | 
  overridevirtual | 
init with given font (either just a font name without .ttf or an absolute path) requires a valid GL context!
Implements View2DFont.