FTContour Class Reference

#include <FTContour.h>

List of all members.

Public Member Functions

 FTContour (FT_Vector *contour, char *pointTags, unsigned int numberOfPoints)
 ~FTContour ()
const FTPointPoint (unsigned int index) const
size_t PointCount () const
 FTContour (FT_Vector *contour, char *pointTags, unsigned int numberOfPoints)
 ~FTContour ()
const FTPointPoint (unsigned int index) const
size_t PointCount () const

Private Types

typedef FTVector< FTPointPointVector
typedef FTVector< FTPointPointVector

Private Member Functions

void AddPoint (FTPoint point)
void AddPoint (float x, float y)
void evaluateQuadraticCurve ()
void evaluateCubicCurve ()
void AddPoint (FTPoint point)
void AddPoint (float x, float y)
void evaluateQuadraticCurve ()
void evaluateCubicCurve ()

Private Attributes

PointVector pointList
float controlPoints [4][2]


Detailed Description

FTContour class is a container of points that describe a vector font outline. It is used as a container for the output of the bezier curve evaluator in FTVectoriser.

See also:
FTOutlineGlyph

FTPolyGlyph

FTPoint

Definition at line 18 of file FTContour.h.


Member Typedef Documentation

typedef FTVector<FTPoint> FTContour::PointVector [private]

The list of points in this contour

Definition at line 79 of file FTContour.h.

typedef FTVector<FTPoint> FTContour::PointVector [private]

The list of points in this contour

Definition at line 79 of file FTContour.h.


Constructor & Destructor Documentation

FTContour::FTContour ( FT_Vector contour,
char *  pointTags,
unsigned int  numberOfPoints 
)

Constructor

Parameters:
contour 
pointTags 
numberOfPoints 

Definition at line 73 of file FTContour.cxx.

References AddPoint(), controlPoints, evaluateCubicCurve(), evaluateQuadraticCurve(), FT_Curve_Tag_Conic, FT_Curve_Tag_Cubic, FT_Curve_Tag_On, pointList, FTVector< FT_VECTOR_ITEM_TYPE >::size(), FTPoint::X(), x, y, and FTPoint::Y().

FTContour::~FTContour (  )  [inline]

Destructor

Definition at line 33 of file FTContour.h.

FTContour::FTContour ( FT_Vector contour,
char *  pointTags,
unsigned int  numberOfPoints 
)

Constructor

Parameters:
contour 
pointTags 
numberOfPoints 

FTContour::~FTContour (  )  [inline]

Destructor

Definition at line 33 of file FTContour.h.


Member Function Documentation

const FTPoint& FTContour::Point ( unsigned int  index  )  const [inline]

Return a point at index.

Parameters:
index of the point in the curve.
Returns:
const point reference

Definition at line 44 of file FTContour.h.

size_t FTContour::PointCount (  )  const [inline]

How many points define this contour

Returns:
the number of points in this contour

Definition at line 51 of file FTContour.h.

Referenced by FTExtrdGlyph::FTExtrdGlyph().

void FTContour::AddPoint ( FTPoint  point  )  [inline, private]

Add a point to this contour. This function tests for duplicate points.

Parameters:
point The point to be added to the contour.

Definition at line 6 of file FTContour.cxx.

References FTVector< FT_VECTOR_ITEM_TYPE >::empty(), pointList, FTVector< FT_VECTOR_ITEM_TYPE >::push_back(), and FTVector< FT_VECTOR_ITEM_TYPE >::size().

Referenced by AddPoint(), evaluateCubicCurve(), evaluateQuadraticCurve(), and FTContour().

void FTContour::AddPoint ( float  x,
float  y 
) [inline, private]

Definition at line 15 of file FTContour.cxx.

References AddPoint().

void FTContour::evaluateQuadraticCurve (  )  [inline, private]

De Casteljau (bezier) algorithm contributed by Jed Soane Evaluates a quadratic or conic (second degree) curve

Definition at line 21 of file FTContour.cxx.

References AddPoint(), BEZIER_STEP_SIZE, controlPoints, i, and t.

Referenced by FTContour().

void FTContour::evaluateCubicCurve (  )  [inline, private]

De Casteljau (bezier) algorithm contributed by Jed Soane Evaluates a cubic (third degree) curve

Definition at line 42 of file FTContour.cxx.

References AddPoint(), BEZIER_STEP_SIZE, controlPoints, i, and t.

Referenced by FTContour().

const FTPoint& FTContour::Point ( unsigned int  index  )  const [inline]

Return a point at index.

Parameters:
index of the point in the curve.
Returns:
const point reference

Definition at line 44 of file FTContour.h.

size_t FTContour::PointCount (  )  const [inline]

How many points define this contour

Returns:
the number of points in this contour

Definition at line 51 of file FTContour.h.

void FTContour::AddPoint ( FTPoint  point  )  [inline, private]

Add a point to this contour. This function tests for duplicate points.

Parameters:
point The point to be added to the contour.

void FTContour::AddPoint ( float  x,
float  y 
) [inline, private]

void FTContour::evaluateQuadraticCurve (  )  [inline, private]

De Casteljau (bezier) algorithm contributed by Jed Soane Evaluates a quadratic or conic (second degree) curve

void FTContour::evaluateCubicCurve (  )  [inline, private]

De Casteljau (bezier) algorithm contributed by Jed Soane Evaluates a cubic (third degree) curve


Member Data Documentation

PointVector FTContour::pointList [private]

Definition at line 80 of file FTContour.h.

Referenced by AddPoint(), and FTContour().

float FTContour::controlPoints [private]

2D array storing values of de Casteljau algorithm.

Definition at line 85 of file FTContour.h.

Referenced by evaluateCubicCurve(), evaluateQuadraticCurve(), and FTContour().


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