CartoType API
Public Member Functions | Protected Attributes | Friends
CartoType::CGlyph Class Reference

#include <cartotype_typeface.h>

Inherited by CFreeTypeOutlineGlyph.

List of all members.

Public Member Functions

virtual TResult Draw (CGraphicsContext *aGc, const TTypefaceInstance &aInstance, double aOriginX, double aOriginY, TRect *aBounds)=0
virtual int32 MemoryUsed ()=0
TFixed AdvanceInEm () const
TFixed AscentInEm () const
TFixed DescentInEm () const

Protected Attributes

CRefCounted< CBitmapiBitmap
TFixed iAdvanceInEm
TFixed iAscentInEm
TFixed iDescentInEm

Friends

class CEngine

Detailed Description

The abstract base class for glyphs. A glyph is a shape with its own coordinate system. It is converted to a particular size only at the time of drawing. Glyph implementations may choose to cache one or more sizes.


Member Function Documentation

TFixed CartoType::CGlyph::AdvanceInEm ( ) const [inline]

Return the linear advance in em.

TFixed CartoType::CGlyph::AscentInEm ( ) const [inline]

Return the unrotated ascent in em.

TFixed CartoType::CGlyph::DescentInEm ( ) const [inline]

Return the unrotated descent in em.

virtual TResult CartoType::CGlyph::Draw ( CGraphicsContext aGc,
const TTypefaceInstance aInstance,
double  aOriginX,
double  aOriginY,
TRect aBounds 
) [pure virtual]

Draw or measure a glyph with its reference point at (aOriginX,aOriginY). The glyph is drawn if aGc is non-null. The glyph is measured if aMetrics is non-null.

virtual int32 CartoType::CGlyph::MemoryUsed ( ) [pure virtual]

Return the number of bytes of heap memory used by a glyph.


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