Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

OGLFT::Raster Class Reference

This is the base class of the raster styles: bitmap, grayscale and translucent. More...

#include <OGLFT.h>

Inheritance diagram for OGLFT::Raster::

OGLFT::Face OGLFT::Grayscale OGLFT::Monochrome OGLFT::Translucent List of all members.

Public Methods

 Raster (const char *filename, float point_size=12, FT_UInt resolution=100)
 Raster (FT_Face face, float point_size=12, FT_UInt resolution=100)
virtual ~Raster (void)
void setCharacterRotationZ (GLfloat character_rotation_z)
GLfloat characterRotationZ (void) const
double height (void) const
BBox measure (unsigned char c)
BBox measure (const QChar c)
BBox measure (const char *s)
BBox measure (const QString &format, double number)

Protected Attributes

GLfloat character_rotation_z_
 Raster glyph can be rotated in the Z plane (in addition to the string rotation).


Detailed Description

This is the base class of the raster styles: bitmap, grayscale and translucent.

In the raster styles, FreeType's rasterizer is used to generate raster images of each glyph.


Constructor & Destructor Documentation

OGLFT::Raster::Raster ( 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::Raster::Raster ( 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::Raster::~Raster ( void ) [virtual]
 

The destructor doesn't do anything in particular.


Member Function Documentation

GLfloat OGLFT::Raster::characterRotationZ ( void ) const [inline, virtual]
 

Returns:
the character rotation in the Z direction.

Reimplemented from OGLFT::Face.

double OGLFT::Raster::height ( void ) const [virtual]
 

Returns:
the height (i.e., line spacing) at the current character size.

Reimplemented from OGLFT::Face.

BBox OGLFT::Raster::measure ( const QString & format,
double number ) [inline, virtual]
 

Implement measuring a formatted number

Parameters:
format   the format string
number   to value to format
Returns:
the bounding box of the formatted number

Reimplemented from OGLFT::Face.

BBox OGLFT::Raster::measure ( const char * s ) [inline, virtual]
 

Measure a string of characters. Note: currently, this merely calls Face's measure routine.

Parameters:
s   string of (latin1) characters to measure
Returns:
the bounding box of s.

Reimplemented from OGLFT::Face.

BBox OGLFT::Raster::measure ( const QChar c ) [virtual]
 

Implement measuring a character in a raster face.

Parameters:
c   the (UNICODE) character to measure
Returns:
the bounding box of c.

Reimplemented from OGLFT::Face.

BBox OGLFT::Raster::measure ( unsigned char c ) [virtual]
 

Implement measuring a character in a raster face.

Parameters:
c   the (latin1) character to measure
Returns:
the bounding box of c.

Reimplemented from OGLFT::Face.

void OGLFT::Raster::setCharacterRotationZ ( GLfloat character_rotation_z ) [virtual]
 

Set the individual character rotation in the Z direction.

Parameters:
character_rotation_z   angle in degrees of Z rotation.

Reimplemented from OGLFT::Face.


The documentation for this class was generated from the following files:
Generated at Fri Jul 12 10:47:16 2002 for OGLFT by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001