GUIDOLib  1.7.7
Guido Engine Internal Documentation
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StaticFont Class Referenceabstract
Inheritance diagram for StaticFont:
VGFont MusicFont TimesFont

Public Member Functions

 StaticFont (const char *name, int size, int properties)
 A font with pre-computed static metrics. More...
 
virtual ~StaticFont ()
 
const char * GetName () const
 Returns the current object's name (as a string) More...
 
int GetSize () const
 Returns the current object's size (as an int) More...
 
int GetProperties () const
 Returns the current object's property value(s) (see enum above) More...
 
virtual void GetExtent (const char *s, int inCharCount, float *outWidth, float *outHeight, VGDevice *context) const
 
virtual void GetExtent (int c, float *outWidth, float *outHeight, VGDevice *context) const
 
- Public Member Functions inherited from VGFont
virtual ~VGFont ()
 

Protected Member Functions

virtual void initialize ()=0
 
float GetExtend (int c) const
 
- Protected Member Functions inherited from VGFont
void * GetContext (VGDevice *context) const
 

Protected Attributes

int fExtends [kMaxTblIndex+1]
 
float fRefSize =1
 
int fHeight =1
 
int fTblOffset =0
 
std::string fName
 
int fSize
 
int fProperties
 

Additional Inherited Members

- Public Types inherited from VGFont
enum  { kFontNone = 0, kFontBold = 1, kFontItalic = 2, kFontUnderline = 4 }
 Font properties. More...
 

Constructor & Destructor Documentation

◆ StaticFont()

StaticFont::StaticFont ( const char *  name,
int  size,
int  properties 
)
inline

A font with pre-computed static metrics.

◆ ~StaticFont()

virtual StaticFont::~StaticFont ( )
inlinevirtual

Member Function Documentation

◆ GetExtend()

float StaticFont::GetExtend ( int  c) const
inlineprotected

◆ GetExtent() [1/2]

virtual void StaticFont::GetExtent ( const char *  s,
int  inCharCount,
float *  outWidth,
float *  outHeight,
VGDevice context 
) const
virtual

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

Implements VGFont.

◆ GetExtent() [2/2]

virtual void StaticFont::GetExtent ( int  c,
float *  outWidth,
float *  outHeight,
VGDevice context 
) const
virtual

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

Implements VGFont.

◆ GetName()

const char* StaticFont::GetName ( ) const
inlinevirtual

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

Implements VGFont.

◆ GetProperties()

int StaticFont::GetProperties ( ) const
inlinevirtual

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

Implements VGFont.

◆ GetSize()

int StaticFont::GetSize ( ) const
inlinevirtual

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

Implements VGFont.

◆ initialize()

virtual void StaticFont::initialize ( )
protectedpure virtual

Implemented in TimesFont, and MusicFont.

Member Data Documentation

◆ fExtends

int StaticFont::fExtends[kMaxTblIndex+1]
protected

◆ fHeight

int StaticFont::fHeight =1
protected

◆ fName

std::string StaticFont::fName
protected

◆ fProperties

int StaticFont::fProperties
protected

◆ fRefSize

float StaticFont::fRefSize =1
protected

◆ fSize

int StaticFont::fSize
protected

◆ fTblOffset

int StaticFont::fTblOffset =0
protected

Guido Project Copyright © 2019 Grame-CNCM