|
CarnegieMellonGraphics | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public static const int HELVETICA;
public static const int MONO_ROMAN;
public static const int ROMAN;
public static const int TIMES;
Constructor Detail |
public Font( int fontID, int pointsize );
ROMAN
, MONO_ROMAN
, HELVETICA
, TIMES
public Font( const Font& font );
public ~Font();
Method Detail |
public std::string getFace() const;
public int getPointSize() const;
public void getStringSize( const std::string& text, int& width, int& height );
text
- [in] Text to measure
width
- [out] Width of the text.
height
- [out] Height of the text.public bool operator!=( const Font& rhs ) const;
public Font& operator=( const Font& rhs );
public bool operator==( const Font& rhs ) const;
public void setPointSize( const int pointsize );
|
CarnegieMellonGraphics | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |