• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

VGFont.h

Go to the documentation of this file.
00001 #ifndef VGFont_H
00002 #define VGFont_H
00003 
00004 /*
00005   GUIDO Library
00006   Copyright (C) 2006    Grame
00007 
00008   This Source Code Form is subject to the terms of the Mozilla Public
00009   License, v. 2.0. If a copy of the MPL was not distributed with this
00010   file, You can obtain one at http://mozilla.org/MPL/2.0/.
00011 
00012   Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
00013   research@grame.fr
00014 
00015 */
00016 
00017 #include "VGDevice.h"
00018 
00024 // --------------------------------------------------------------
00025 //      VGFont class
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         // - VGFont services ---------------------------------------------
00051         virtual const char *    GetName() const = 0;
00053         virtual int             GetSize() const = 0 ;
00055         virtual int             GetProperties() const = 0 ;
00056 
00057         // - Symbol services ---------------------------------------------
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

Generated on Mon Jan 5 2015 11:16:24 for GUIDOLib by doxygen 1.7.2 - © Grame Research Lab.