Go to the documentation of this file.00001 #ifndef VGFont_H
00002 #define VGFont_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "VGDevice.h"
00018
00024
00025
00026
00036 class VGFont
00037 {
00038 public:
00040 enum {
00041 kFontNone = 0,
00042 kFontBold = 1,
00043 kFontItalic = 2,
00044 kFontUnderline = 4
00045 };
00046
00047 virtual ~VGFont() {}
00048
00049
00051 virtual const char * GetName() const = 0;
00053 virtual int GetSize() const = 0 ;
00055 virtual int GetProperties() const = 0 ;
00056
00057
00060 virtual void GetExtent( const char * s,
00061 int inCharCount,
00062 float * outWidth,
00063 float * outHeight,
00064 VGDevice * context ) const = 0;
00065
00068 virtual void GetExtent( unsigned char c,
00069 float * outWidth,
00070 float * outHeight,
00071 VGDevice * context ) const = 0;
00072
00073 protected:
00074 void * GetContext( VGDevice * context) const { return context->GetNativeContext(); }
00075 };
00076
00079 #endif