FTBitmapGlyph Class Reference

#include <FTBitmapGlyph.h>

Inheritance diagram for FTBitmapGlyph:

FTGlyph FTGlyph List of all members.

Public Member Functions

 FTBitmapGlyph (FT_GlyphSlot glyph)
virtual ~FTBitmapGlyph ()
virtual const FTPointRender (const FTPoint &pen)
 FTBitmapGlyph (FT_GlyphSlot glyph)
virtual ~FTBitmapGlyph ()
virtual const FTPointRender (const FTPoint &pen)

Private Attributes

unsigned int destWidth
unsigned int destHeight
unsigned int destPitch
FTPoint pos
unsigned char * data
unsigned char * data

Detailed Description

FTBitmapGlyph is a specialisation of FTGlyph for creating bitmaps.

It provides the interface between Freetype glyphs and their openGL Renderable counterparts. This is an abstract class and derived classes must implement the Render function.

See also:
FTGlyphContainer

Definition at line 23 of file FTBitmapGlyph.h.


Constructor & Destructor Documentation

FTBitmapGlyph::FTBitmapGlyph ( FT_GlyphSlot  glyph  ) 

Constructor

Parameters:
glyph The Freetype glyph to be processed

Definition at line 5 of file FTBitmapGlyph.cxx.

References FT_GlyphSlotRec_::bitmap, FT_GlyphSlotRec_::bitmap_left, FT_GlyphSlotRec_::bitmap_top, FT_Bitmap_::buffer, data, destHeight, destPitch, destWidth, FTGlyph::err, FT_GlyphSlotRec_::format, ft_glyph_format_bitmap, FT_Render_Glyph(), FT_RENDER_MODE_MONO, FT_Bitmap_::pitch, pos, FT_Bitmap_::rows, FT_Bitmap_::width, and y.

FTBitmapGlyph::~FTBitmapGlyph (  )  [virtual]

Destructor

Definition at line 46 of file FTBitmapGlyph.cxx.

References data.

FTBitmapGlyph::FTBitmapGlyph ( FT_GlyphSlot  glyph  ) 

Constructor

Parameters:
glyph The Freetype glyph to be processed

virtual FTBitmapGlyph::~FTBitmapGlyph (  )  [virtual]

Destructor


Member Function Documentation

const FTPoint & FTBitmapGlyph::Render ( const FTPoint pen  )  [virtual]

Renders this glyph at the current pen position.

Parameters:
pen The current pen position.
Returns:
The advance distance for this glyph.

Implements FTGlyph.

Definition at line 52 of file FTBitmapGlyph.cxx.

References FTGlyph::advance, data, destHeight, destPitch, destWidth, GL_UNPACK_ROW_LENGTH, glBitmap(), glPixelStorei(), pos, FTPoint::X(), and FTPoint::Y().

virtual const FTPoint& FTBitmapGlyph::Render ( const FTPoint pen  )  [virtual]

Renders this glyph at the current pen position.

Parameters:
pen The current pen position.
Returns:
The advance distance for this glyph.

Implements FTGlyph.


Member Data Documentation

unsigned int FTBitmapGlyph::destWidth [private]

The width of the glyph 'image'

Definition at line 50 of file FTBitmapGlyph.h.

Referenced by FTBitmapGlyph(), and Render().

unsigned int FTBitmapGlyph::destHeight [private]

The height of the glyph 'image'

Definition at line 55 of file FTBitmapGlyph.h.

Referenced by FTBitmapGlyph(), and Render().

unsigned int FTBitmapGlyph::destPitch [private]

The pitch of the glyph 'image'

Definition at line 60 of file FTBitmapGlyph.h.

Referenced by FTBitmapGlyph(), and Render().

FTPoint FTBitmapGlyph::pos [private]

Vector from the pen position to the topleft corner of the bitmap

Definition at line 65 of file FTBitmapGlyph.h.

Referenced by FTBitmapGlyph(), and Render().

unsigned char* FTBitmapGlyph::data [private]

Pointer to the 'image' data

Definition at line 70 of file FTBitmapGlyph.h.

Referenced by FTBitmapGlyph(), Render(), and ~FTBitmapGlyph().

unsigned char* FTBitmapGlyph::data [private]

Pointer to the 'image' data

Definition at line 70 of file FTBitmapGlyph.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:25:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1