Changeset 3694 in orxonox.OLD for orxonox/branches/textEngine/src/lib/graphics/font/glfont.h
- Timestamp:
- Mar 31, 2005, 11:45:30 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/textEngine/src/lib/graphics/font/glfont.h
r3693 r3694 12 12 13 13 /* some default values */ 14 #define FONT_DEFAULT_SIZE 1815 #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. 20 20 21 21 22 22 23 23 //! A struct for handling glyphs 24 struct glyph 24 /** 25 a Glyph is one letter of a certain font 26 */ 27 struct Glyph 25 28 { 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 36 39 }; 37 40 38 41 //! A class to handle a Font 39 42 class GLFont 40 43 { … … 71 74 // placement in openGL 72 75 GLuint texture; 76 SDL_Rect textPosSize; //!< A SDL-Rectangle representing the position and size of the Text on the screen. 73 77 int positionX; 74 78 int positionY; 79 int width; 80 int height; 75 81 int renderStyle; 76 82 SDL_Surface* surface; … … 81 87 int getMaxAscent(void); 82 88 int getMaxDescent(void); 83 glyph getGlyphMetrics(Uint16 character);89 Glyph getGlyphMetrics(Uint16 character); 84 90 85 91 static bool ttfInitialized;
Note: See TracChangeset
for help on using the changeset viewer.