CartoType API
Public Member Functions | Static Public Member Functions
CartoType::COutline Class Reference

#include <cartotype_graphics.h>

Inheritance diagram for CartoType::COutline:
CartoType::MPath

List of all members.

Public Member Functions

int32 Contours () const
void GetContour (int32 aIndex, TContour &aContour) const
TResult AppendContour (CContour *aContour)
void ClearContents ()
void Clear ()
CContourAppendContour (TResult &aError)
const CContourContour (int32 aIndex) const
CContourContour (int32 aIndex)
CT_IMPORT TResult AppendCircularPenEnvelope (CEngine *aEngine, const MPath &aPath, const TCircularPen &aPen, const TRect *aClip, bool aPathIn64ths)
CT_IMPORT TResult AppendCircularPenEnvelopeSides (CEngine *aEngine, const TContour &aContour, TFixed aPenWidth, const TRect *aClip, bool aPathIn64ths)
CT_IMPORT int32 MemoryUsed () const
CT_IMPORT TResult Copy (const MPath &aPath)
CT_IMPORT TResult AppendTriangulatedContour (const TContour &aContour, double aTolerance)

Static Public Member Functions

static CT_IMPORT COutlineCircularPenEnvelope (TResult &aError, CEngine *aEngine, const MPath &aPath, const TCircularPen &aPen, const TRect *aClip, bool aPathIn64ths=false)
static CT_IMPORT COutlineMarkers (TResult &aError, const MPath &aPath, const CMarker *const aMarkerStart, const CMarker *const aMarkerMid, const CMarker *const aMarkerEnd, const TRect &aClip)
static CT_IMPORT COutlineTriangulate (TResult &aError, const MPath &aPath, double aTolerance)

Detailed Description

An outline that owns its data.


Member Function Documentation

CT_EXPORT TResult COutline::AppendCircularPenEnvelope ( CEngine aEngine,
const MPath aPath,
const TCircularPen aPen,
const TRect aClip,
bool  aPathIn64ths 
)

Append contours that are the envelope of the strokes in aPath, drawn using a circular pen according to the parameters supplied in aParam.

If aEngine is non-null it may be used to obtain temporary storage to speed up the work.

CT_EXPORT TResult COutline::AppendCircularPenEnvelopeSides ( CEngine aEngine,
const TContour aContour,
TFixed  aPenWidth,
const TRect aClip,
bool  aPathIn64ths 
)

Append the left and right sides of the envelope of aContour, with no end caps, drawn using a circular pen along aContour. aPathIn64ths indicates whether the contour's coordinates are in 64ths of pixels or full pixels.

If aEngine is non-null it may be used to obtain temporary storage to speed up the work.

TResult CartoType::COutline::AppendContour ( CContour aContour) [inline]

Append a contour, taking ownership of it.

CContour* CartoType::COutline::AppendContour ( TResult aError) [inline]

Append a new empty contour to the outline and return it.

CT_EXPORT COutline * COutline::CircularPenEnvelope ( TResult aError,
CEngine aEngine,
const MPath aPath,
const TCircularPen aPen,
const TRect aClip,
bool  aPathIn64ths = false 
) [static]

Create an outline that is the envelope of a set of strokes drawn using a circular pen, according to the parameters supplied in aParam. The strokes are the contours of aPath. aPathIn64ths indicates whether the path coordinates are in 64ths of pixels or full pixels.

If aEngine is non-null it may be used to obtain temporary storage to speed up the work.

void CartoType::COutline::Clear ( ) [inline]

Clear an outline, freeing all memory used.

void CartoType::COutline::ClearContents ( ) [inline]

Clear the contents of the outline, preserving the allocated memory.

const CContour& CartoType::COutline::Contour ( int32  aIndex) const [inline]

Return a constant reference to a contour, selected by its index.

CContour& CartoType::COutline::Contour ( int32  aIndex) [inline]

Return a non-constant reference to a contour, selected by its index.

int32 CartoType::COutline::Contours ( ) const [inline, virtual]

Return the number of contours.

Implements CartoType::MPath.

void CartoType::COutline::GetContour ( int32  aIndex,
TContour aContour 
) const [inline, virtual]

Return the contour indexed by aIndex.

Implements CartoType::MPath.

CT_EXPORT COutline * COutline::Markers ( TResult aError,
const MPath aPath,
const CMarker *const  aMarkerStart,
const CMarker *const  aMarkerMid,
const CMarker *const  aMarkerEnd,
const TRect aClip 
) [static]

Create an outline that contains markers along the path

CT_EXPORT int32 COutline::MemoryUsed ( ) const

Return the number of bytes of heap memory used by the outline.

CT_EXPORT COutline * COutline::Triangulate ( TResult aError,
const MPath aPath,
double  aTolerance 
) [static]

Create an outline consisting only of triangles, representing the original path. aTolerance is used if the path contains curves. It is the maximum distance of any control point from the straight line used to approximate a curve. Curves are split until this tolerance is achieved.


The documentation for this class was generated from the following files: