Public Types | Public Member Functions | Protected Member Functions

VGFont Class Reference
[Virtual Graphic System]

Generic pure virtual & device-independant font class. More...

List of all members.

Public Types

enum  { kFontNone = 0, kFontBold = 1, kFontItalic = 2, kFontUnderline = 4 }
 

Font properties.

More...

Public Member Functions

virtual ~VGFont ()
virtual const char * GetName () const =0
 Returns the current object's name (as a string)
virtual int GetSize () const =0
 Returns the current object's size (as an int)
virtual int GetProperties () const =0
 Returns the current object's property value(s) (see enum above)
virtual void GetExtent (const char *s, int inCharCount, float *outWidth, float *outHeight, VGDevice *context) const =0
virtual void GetExtent (unsigned char c, float *outWidth, float *outHeight, VGDevice *context) const =0

Protected Member Functions

void * GetContext (VGDevice *context) const

Detailed Description

Generic pure virtual & device-independant font class.

This class replaces the previously defined GFontInfos class that was attached to a VGDevice. It declares the minimal set of necessary methods/attributes to use a font. Fonts can now be seen as independant objects to be created by the VGSystem and then associated when necessary to the VGDevice.


Member Enumeration Documentation

anonymous enum

Font properties.

Enumerator:
kFontNone 
kFontBold 
kFontItalic 
kFontUnderline 

Constructor & Destructor Documentation

virtual ~VGFont (  ) [inline, virtual]

Member Function Documentation

virtual const char* GetName (  ) const [pure virtual]

Returns the current object's name (as a string)

virtual int GetSize (  ) const [pure virtual]

Returns the current object's size (as an int)

virtual int GetProperties (  ) const [pure virtual]

Returns the current object's property value(s) (see enum above)

virtual void GetExtent ( const char *  s,
int  inCharCount,
float *  outWidth,
float *  outHeight,
VGDevice context 
) const [pure virtual]

Computes the width and height of the input string using the current font capabilities in the input VGDevice

virtual void GetExtent ( unsigned char  c,
float *  outWidth,
float *  outHeight,
VGDevice context 
) const [pure virtual]

Computes the width and height of the input character using the current font capabilities in the input VGDevice

void* GetContext ( VGDevice context ) const [inline, protected]