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::

OGLFT::Raster OGLFT::Face 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.

monochrome_class.png
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:
file   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:
font   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 at Fri Jul 12 10:47:15 2002 for OGLFT by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001