FTVectoriser Class Reference

#include <FTVectoriser.h>

List of all members.

Public Member Functions

 FTVectoriser (const FT_GlyphSlot glyph)
virtual ~FTVectoriser ()
void MakeMesh (FTGL_DOUBLE zNormal=FTGL_FRONT_FACING)
const FTMeshGetMesh () const
size_t PointCount ()
size_t ContourCount () const
const FTContourContour (unsigned int index) const
size_t ContourSize (int c) const
int ContourFlag () const
 FTVectoriser (const FT_GlyphSlot glyph)
virtual ~FTVectoriser ()
void MakeMesh (FTGL_DOUBLE zNormal=FTGL_FRONT_FACING)
const FTMeshGetMesh () const
size_t PointCount ()
size_t ContourCount () const
const FTContourContour (unsigned int index) const
size_t ContourSize (int c) const
int ContourFlag () const

Private Member Functions

void ProcessContours ()
void ProcessContours ()

Private Attributes

FTContour ** contourList
FTMeshmesh
short ftContourCount
int contourFlag
FT_Outline outline
FTContour ** contourList
FTMeshmesh


Detailed Description

FTVectoriser class is a helper class that converts font outlines into point data.

See also:
FTExtrdGlyph

FTOutlineGlyph

FTPolyGlyph

FTContour

FTPoint

Definition at line 178 of file FTVectoriser.h.


Constructor & Destructor Documentation

FTVectoriser::FTVectoriser ( const FT_GlyphSlot  glyph  ) 

Constructor

Parameters:
glyph The freetype glyph to be processed

Definition at line 101 of file FTVectoriser.cxx.

References contourFlag, contourList, FT_Outline_::flags, ftContourCount, FT_Outline_::n_contours, outline, FT_GlyphSlotRec_::outline, and ProcessContours().

FTVectoriser::~FTVectoriser (  )  [virtual]

Destructor

Definition at line 120 of file FTVectoriser.cxx.

References c, ContourCount(), contourList, mesh, and size_t.

FTVectoriser::FTVectoriser ( const FT_GlyphSlot  glyph  ) 

Constructor

Parameters:
glyph The freetype glyph to be processed

virtual FTVectoriser::~FTVectoriser (  )  [virtual]

Destructor


Member Function Documentation

void FTVectoriser::MakeMesh ( FTGL_DOUBLE  zNormal = FTGL_FRONT_FACING  ) 

Build an FTMesh from the vector outline data.

Parameters:
zNormal The direction of the z axis of the normal for this mesh

Definition at line 175 of file FTVectoriser.cxx.

References c, ContourCount(), contourFlag, contourList, d, ft_outline_even_odd_fill, ftglBegin(), ftglCombine(), ftglEnd(), ftglError(), ftglVertex(), mesh, p, and size_t.

Referenced by FTExtrdGlyph::FTExtrdGlyph(), and FTPolyGlyph::FTPolyGlyph().

const FTMesh* FTVectoriser::GetMesh (  )  const [inline]

Get the current mesh.

Definition at line 204 of file FTVectoriser.h.

Referenced by FTExtrdGlyph::FTExtrdGlyph(), and FTPolyGlyph::FTPolyGlyph().

size_t FTVectoriser::PointCount (  ) 

Get the total count of points in this outline

Returns:
the number of points

Definition at line 157 of file FTVectoriser.cxx.

References c, ContourCount(), contourList, s, and size_t.

Referenced by FTExtrdGlyph::FTExtrdGlyph(), FTOutlineGlyph::FTOutlineGlyph(), and FTPolyGlyph::FTPolyGlyph().

size_t FTVectoriser::ContourCount (  )  const [inline]

Get the count of contours in this outline

Returns:
the number of contours

Definition at line 218 of file FTVectoriser.h.

Referenced by Contour(), FTExtrdGlyph::FTExtrdGlyph(), FTOutlineGlyph::FTOutlineGlyph(), FTPolyGlyph::FTPolyGlyph(), MakeMesh(), PointCount(), and ~FTVectoriser().

const FTContour * FTVectoriser::Contour ( unsigned int  index  )  const

Return a contour at index

Returns:
the number of contours

Definition at line 169 of file FTVectoriser.cxx.

References ContourCount(), contourList, and NULL.

Referenced by FTExtrdGlyph::FTExtrdGlyph(), and FTOutlineGlyph::FTOutlineGlyph().

size_t FTVectoriser::ContourSize ( int  c  )  const [inline]

Get the number of points in a specific contour in this outline

Parameters:
c The contour index
Returns:
the number of points in contour[c]

Definition at line 233 of file FTVectoriser.h.

int FTVectoriser::ContourFlag (  )  const [inline]

Get the flag for the tesselation rule for this outline

Returns:
The contour flag

Definition at line 240 of file FTVectoriser.h.

Referenced by FTExtrdGlyph::FTExtrdGlyph().

void FTVectoriser::ProcessContours (  )  [private]

Process the freetype outline data into contours of points

Definition at line 132 of file FTVectoriser.cxx.

References contourList, FT_Outline_::contours, ftContourCount, outline, FT_Outline_::points, and FT_Outline_::tags.

Referenced by FTVectoriser().

void FTVectoriser::MakeMesh ( FTGL_DOUBLE  zNormal = FTGL_FRONT_FACING  ) 

Build an FTMesh from the vector outline data.

Parameters:
zNormal The direction of the z axis of the normal for this mesh

const FTMesh* FTVectoriser::GetMesh (  )  const [inline]

Get the current mesh.

Definition at line 204 of file FTVectoriser.h.

size_t FTVectoriser::PointCount (  ) 

Get the total count of points in this outline

Returns:
the number of points

size_t FTVectoriser::ContourCount (  )  const [inline]

Get the count of contours in this outline

Returns:
the number of contours

Definition at line 218 of file FTVectoriser.h.

const FTContour* FTVectoriser::Contour ( unsigned int  index  )  const

Return a contour at index

Returns:
the number of contours

size_t FTVectoriser::ContourSize ( int  c  )  const [inline]

Get the number of points in a specific contour in this outline

Parameters:
c The contour index
Returns:
the number of points in contour[c]

Definition at line 233 of file FTVectoriser.h.

int FTVectoriser::ContourFlag (  )  const [inline]

Get the flag for the tesselation rule for this outline

Returns:
The contour flag

Definition at line 240 of file FTVectoriser.h.

void FTVectoriser::ProcessContours (  )  [private]

Process the freetype outline data into contours of points


Member Data Documentation

FTContour** FTVectoriser::contourList [private]

The list of contours in the glyph

Definition at line 251 of file FTVectoriser.h.

Referenced by Contour(), FTVectoriser(), MakeMesh(), PointCount(), ProcessContours(), and ~FTVectoriser().

FTMesh* FTVectoriser::mesh [private]

A Mesh for tesselations

Definition at line 256 of file FTVectoriser.h.

Referenced by MakeMesh(), and ~FTVectoriser().

short FTVectoriser::ftContourCount [private]

The number of contours reported by Freetype

Definition at line 261 of file FTVectoriser.h.

Referenced by FTVectoriser(), and ProcessContours().

int FTVectoriser::contourFlag [private]

A flag indicating the tesselation rule for the glyph

Definition at line 266 of file FTVectoriser.h.

Referenced by FTVectoriser(), and MakeMesh().

FT_Outline FTVectoriser::outline [private]

A Freetype outline

Definition at line 271 of file FTVectoriser.h.

Referenced by FTVectoriser(), and ProcessContours().

FTContour** FTVectoriser::contourList [private]

The list of contours in the glyph

Definition at line 251 of file FTVectoriser.h.

FTMesh* FTVectoriser::mesh [private]

A Mesh for tesselations

Definition at line 256 of file FTVectoriser.h.


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