Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members
OGLFT::Monochrome Class Reference
Render text as a monochrome raster image.
More...
#include <OGLFT.h>
Inheritance diagram for OGLFT::Monochrome:
List of all members.
|
Public Methods |
| Monochrome (const char *filename, float point_size=12, FT_UInt resolution=100) |
| Monochrome (FT_Face face, float point_size=12, FT_UInt resolution=100) |
| ~Monochrome (void) |
Detailed Description
Render text as a monochrome raster image.
This is more or less the standard way in which text is intended to be rendered in OpenGL. It uses the glBitmap
call to draw a sequence of monochrome bitmaps. Since FreeType is capable of rotating glyphs created from faces based on vector outlines, you can rotate (in the Z plane) both the text string as well as the individual characters in the string.
Note: you must call
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
before drawing in order for monochrome glyphs to be rendered properly.
Another note: It is helpful to have the option GL_RASTER_POSITION_UNCLIPPED_IBM
available if you intend to draw text at MODELVIEW based positions, otherwise if the initial text position is off the screen, the entire image is clipped.
Constructor & Destructor Documentation
OGLFT::Monochrome::Monochrome |
( |
const char * |
filename, |
|
|
float |
point_size = 12, |
|
|
FT_UInt |
resolution = 100 |
|
) |
|
|
|
- Parameters:
-
filename |
the filename which contains the font face. |
point_size |
the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12. |
resolution |
the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI. |
|
OGLFT::Monochrome::Monochrome |
( |
FT_Face |
face, |
|
|
float |
point_size = 12, |
|
|
FT_UInt |
resolution = 100 |
|
) |
|
|
|
- Parameters:
-
face |
open FreeType FT_Face. |
point_size |
the initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12. |
resolution |
the pixel density of the display in dots per inch (DPI). Defaults to 100 DPI. |
|
OGLFT::Monochrome::~Monochrome |
( |
void |
|
) |
|
|
|
The destructor doesn't do anything in particular. |
The documentation for this class was generated from the following files:
Generated on Wed Oct 1 10:39:03 2003 for OGLFT by
1.2.18