oaFont Class Reference


Public Methods

 oaFont ()
 oaFont (oaFontEnum valueIn)
 oaFont (const oaString &name)
 ~oaFont ()
void calcBBox (const oaPoint &origin, const oaString &text, oaDist height, oaTextAlign textAlign, oaOrient orient, oaBoolean hasOverbar, oaBox &bBox)
void calcBBox (const oaPoint &origin, const oaChar *text, oaDist height, oaTextAlign textAlign, oaOrient orient, oaBoolean hasOverbar, oaBox &bBox)
const oaStringgetName () const
 operator oaFontEnum () const

Detailed Description

The oaFont class implements an enumerated font type. This class also implements functions for calculating the bounding box of any text string in a specified font with a specified set of attributes.

enum oaFontEnum
 

Enumeration values:
oacEuroStyleFont  "euroStyle"
oacGothicFont  "gothic"
oacMathFont  "math"
oacRomanFont  "roman"
oacScriptFont  "script"
oacStickFont  "stick"
oacFixedFont  "fixed"
oacSwedishFont  "swedish"
oacMilSpecFont  "milSpec"


Constructor & Destructor Documentation

oaFont::oaFont   [inline]
 

This function constructs an oaFont class with the font value initialized to oacStickFont.

oaFont::oaFont oaFontEnum    valueIn [inline]
 

This function constructs an instance of an oaFont class using the specified enum value. The enum values are defined in oaFontEnum.

oaFont::oaFont const oaString &    name
 

This function constructs an instance of an oaFont class using the oaFontEnum associated with the specified string name. This name must be defined in the legal set of names associated with oaFontEnum.

Exceptions:
oacInvalidFontName 

oaFont::~oaFont   [inline]
 

This function destroys this oaFont class.


Member Function Documentation

void oaFont::calcBBox const oaPoint &    origin,
const oaChar *    text,
oaDist    height,
oaTextAlign    textAlign,
oaOrient    orient,
oaBoolean    hasOverbar,
oaBox &    bBox
 

This function calculates the bounding box for the specified arguments in the current font.

Parameters:
origin The origin point of the bounding box
text The text for which to calculate the bounding box
height The height of the bounding box
textAlign The text alignment of the bounding box
orient The orientation of the bounding box
hasOverbar Determines if the text has a bar over it
bBox The bounding box specifications

void oaFont::calcBBox const oaPoint &    origin,
const oaString &    text,
oaDist    height,
oaTextAlign    textAlign,
oaOrient    orient,
oaBoolean    hasOverbar,
oaBox &    bBox
 

This function calculates the bounding box for the specified arguments in the current font.

Parameters:
origin The origin point of the bounding box
text The text for which to calculate the bounding box
height The height of the bounding box
textAlign The text alignment of the bounding box
orient The orientation of the bounding box
hasOverbar Determines if the text has a bar over it
bBox The bounding box specifications

const oaString & oaFont::getName   const
 

This function returns the name string associated with the encapsulated oaFontEnum object.

oaFont::operator oaFontEnum   const [inline]
 

This operator casts this oaFontobject into the corresponding oaFontEnum value.


The documentation for this class was generated from the following files:

Return to top of page