GUIDOLib  1.7.7
Guido Engine Internal Documentation
SVGFont.h
1 #ifndef __SVGFont__
2 #define __SVGFont__
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2011 Grame
7 
8  This Source Code Form is subject to the terms of the Mozilla Public
9  License, v. 2.0. If a copy of the MPL was not distributed with this
10  file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 
12  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
13  research@grame.fr
14 
15 */
16 
17 #include "VGFont.h"
18 
23 class VGDevice;
24 // --------------------------------------------------------------
27 class SVGFont : public VGFont
28 {
29  std::string fName;
30 
31  const VGFont * fFont;
32  VGDevice * fDevice;
33 
34  public:
35  SVGFont(const char * name, int size, int properties);
36  virtual ~SVGFont();
37 
38  virtual const char * GetName() const { return fFont->GetName(); }
39  virtual int GetSize() const { return fFont->GetSize(); }
40  virtual int GetProperties() const { return fFont->GetProperties(); }
41 
42  virtual void GetExtent( const char * s, int inCharCount, float * outWidth, float * outHeight, VGDevice * context ) const;
43  virtual void GetExtent( int c, float * outWidth, float * outHeight, VGDevice * context ) const;
44 };
45 
48 #endif
SVGFont
a SVG font class.
Definition: SVGFont.h:27
SVGFont::~SVGFont
virtual ~SVGFont()
VGFont::GetProperties
virtual int GetProperties() const =0
Returns the current object's property value(s) (see enum above)
SVGFont::GetName
virtual const char * GetName() const
Returns the current object's name (as a string)
Definition: SVGFont.h:38
VGFont::GetName
virtual const char * GetName() const =0
Returns the current object's name (as a string)
VGFont::GetSize
virtual int GetSize() const =0
Returns the current object's size (as an int)
SVGFont::SVGFont
SVGFont(const char *name, int size, int properties)
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
SVGFont::GetProperties
virtual int GetProperties() const
Returns the current object's property value(s) (see enum above)
Definition: SVGFont.h:40
VGFont
Generic pure virtual & device-independant font class.
Definition: VGFont.h:36
SVGFont::GetExtent
virtual void GetExtent(const char *s, int inCharCount, float *outWidth, float *outHeight, VGDevice *context) const
SVGFont::GetSize
virtual int GetSize() const
Returns the current object's size (as an int)
Definition: SVGFont.h:39

Guido Project Copyright © 2019 Grame-CNCM