Generic pure virtual & device-independant font class. More...
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 |
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.
| virtual ~VGFont | ( | ) | [inline, virtual] |
| 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] |
References VGDevice::GetNativeContext().
1.7.2 - © Grame Research Lab.