Overview   Project   Class   Tree   Deprecated   Index 
CarnegieMellonGraphics
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

CarnegieMellonGraphics2
Class Font

   in CarnegieMellonGraphics.h

class Font

Class for representing fonts. A new font object can be created using one of the built-in fonts. See Font(int,int).


Field Summary
 static const int HELVETICA
          bitmapped fonts, must be used at specific sizes; helvetica sizes: 10,12, 18.
 static const int MONO_ROMAN
          stroked font, can be used at any resolution
 static const int ROMAN
          stroked font, can be used at any resolution
 static const int TIMES
          bitmapped fonts, must be used at specific sizes; times sizes: 10, 24.
 
Constructor Summary
Font( int fontID, int pointsize )
          Constructor for creating fonts from one of the builtin fonts.
Font( const Font& font )
          Copy constructor
~Font()
          
 
Method Summary
 std::string getFace() const
          
 int getPointSize() const
          
 void getStringSize( const std::string& text, int& width, int& height )
          Get the dimensions of the specified text.
 bool operator!=( const Font& rhs ) const
          Comparison operator for inequality on fonts
 Font& operator=( const Font& rhs )
          Assignment operator
 bool operator==( const Font& rhs ) const
          Comparison operator for equality on fonts
 void setPointSize( const int pointsize )
          
 

Field Detail

HELVETICA

public static const int HELVETICA;
bitmapped fonts, must be used at specific sizes; helvetica sizes: 10,12, 18.

MONO_ROMAN

public static const int MONO_ROMAN;
stroked font, can be used at any resolution

ROMAN

public static const int ROMAN;
stroked font, can be used at any resolution

TIMES

public static const int TIMES;
bitmapped fonts, must be used at specific sizes; times sizes: 10, 24.


Constructor Detail

Font

public Font( int fontID, int pointsize );
Constructor for creating fonts from one of the builtin fonts.
Since:
2.10
See Also:
ROMAN, MONO_ROMAN, HELVETICA, TIMES

Font

public Font( const Font& font );
Copy constructor

~Font

public ~Font();


Method Detail

getFace

public std::string getFace() const;

getPointSize

public int getPointSize() const;

getStringSize

public void getStringSize( const std::string& text, int& width, int& height );
Get the dimensions of the specified text. Put the results in width and height.
Parameters:
text - [in] Text to measure
width - [out] Width of the text.
height - [out] Height of the text.
Since:
2.1.2

operator!=

public bool operator!=( const Font& rhs ) const;
Comparison operator for inequality on fonts

operator=

public Font& operator=( const Font& rhs );
Assignment operator

operator==

public bool operator==( const Font& rhs ) const;
Comparison operator for equality on fonts

setPointSize

public void setPointSize( const int pointsize );

 Overview   Project   Class   Tree   Deprecated   Index 
CarnegieMellonGraphics
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD