Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 31, 2005, 11:45:30 AM (20 years ago)
Author:
bensch
Message:

orxonox/textEngine: doxygen tags, some minor fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/textEngine/src/lib/graphics/font/glfont.h

    r3693 r3694  
    1212
    1313/* some default values */
    14 #define FONT_DEFAULT_SIZE       18
    15 #define FONT_DEFAULT_TEXT       "orxonox 1234567890"
    16 #define FONT_DEFAULT_COLOR_R    256
    17 #define FONT_DEFAULT_COLOR_G    256
    18 #define FONT_DEFAULT_COLOR_B    256
    19 #define FONT_NUM_COLORS         256
     14#define FONT_DEFAULT_SIZE       50                   //!< default size of the Text
     15#define FONT_DEFAULT_TEXT       "orxonox 1234567890" //!< some default text to display
     16#define FONT_DEFAULT_COLOR_R    256                  //!< the default red part (color) of the text
     17#define FONT_DEFAULT_COLOR_G    256                  //!< the default red green (color) of the text
     18#define FONT_DEFAULT_COLOR_B    256                  //!< the default red blue (color) of the text
     19#define FONT_NUM_COLORS         256                  //!< The number of colors.
    2020
    2121
    2222
    2323//! A struct for handling glyphs
    24 struct glyph
     24/**
     25   a Glyph is one letter of a certain font
     26*/
     27struct Glyph
    2528{
    26   Uint16 character;
    27   int minX;
    28   int maxX;
    29   int minY;
    30   int maxY;
    31   int width;
    32   int height;
    33   int bearingX;
    34   int bearingY;
    35   int advance;
     29  Uint16 character;              //!< The character
     30  int minX;                      //!< The minimum distance from the origin in X
     31  int maxX;                      //!< The maximum distance from the origin in X
     32  int minY;                      //!< The minimum distance from the origin in Y
     33  int maxY;                      //!< The maximum distance from the origin in Y
     34  int width;                     //!< The width of the Glyph
     35  int height;                    //!< The height of the Glyph
     36  int bearingX;                  //!< How much is right of the Origin
     37  int bearingY;                  //!< How much is above the Origin
     38  int advance;                   //!< How big a Glyph would be in monospace-mode
    3639};
    3740
    38 
     41//! A class to handle a Font
    3942class GLFont
    4043{
     
    7174  // placement in openGL
    7275  GLuint texture;
     76  SDL_Rect textPosSize;               //!< A SDL-Rectangle representing the position and size of the Text on the screen.
    7377  int positionX;
    7478  int positionY;
     79  int width;
     80  int height;
    7581  int renderStyle;
    7682  SDL_Surface* surface;
     
    8187  int getMaxAscent(void);
    8288  int getMaxDescent(void);
    83   glyph getGlyphMetrics(Uint16 character);
     89  Glyph getGlyphMetrics(Uint16 character);
    8490
    8591  static bool ttfInitialized;
Note: See TracChangeset for help on using the changeset viewer.