BFont Class Reference

#include <BFont.h>

Inheritance diagram for BFont:

Inheritance graph
[legend]

List of all members.


Detailed Description

Defines a text font.

Public Member Functions

 BFont (const BFont &f)
 Copy constructor.
 BFont (const BString &face, double height)
 Constructs a BFont with the specified face name and size.
 BFont ()
 Default constructor.
virtual size_t ComputeSize (void) const
 Computes the size of the BByteArray required to store this object.
virtual void FromByteArray (const BByteArray &bytes, size_t &startPos)
 Initializes an instance of this object from a BByteArray.
BColor GetBGColor (void) const
 Gets the background color for this BFont.
const BStringGetFaceName (void) const
 Gets the name of the font.
BColor GetFGColor (void) const
 Get the foreground color for this BFont, which is the color of the text.
double GetHeight (void) const
 Gets the font height.
EHorzAlignment GetHorizontalAlignment (void) const
 Gets the horizontal alignment of this BFont relative to the insertion point.
BRotation GetRotation (void) const
 Gets the rotation angle for this BFont.
double GetRotationAngle (void) const
 Gets the rotation angle for this BFont.
EVertAlignment GetVerticalAlignment (void) const
 Gets the vertical alignment of this BFont relative to the insertion point.
bool IsBold (void) const
 Gets an indicator of whether or not this BFont is bold.
bool IsItalic (void) const
 Gets an indicator of whether or not this BFont is italic.
bool IsUnderlined (void) const
 Gets an indicator of whether or not this BFont is underlined.
void SetBGColor (const BColor &color)
 Sets the background color for this BFont.
void SetBold (bool val)
 Sets an indicator of whether or not this BFont is bold.
void SetFaceName (const BString &face)
 Sets the name of the font.
void SetFGColor (const BColor &color)
 Sets the foreground color for this BFont, which is the color of the text.
void SetHeight (double height)
 Sets the font height.
void SetHorizontalAlignment (EHorzAlignment align)
 Sets the horizontal alignment for this BFont relative to the insertion point.
void SetItalic (bool val)
 Sets an indicator of whether or not this BFont is italic.
void SetRotation (const BRotation &rot)
 Sets the rotation info for this BFont.
void SetRotationAngle (double ang)
 Sets the rotation angle for this BFont.
void SetUnderlined (bool val)
 Sets an indicator of whether or not this BFont is underlined.
void SetVerticalAlignment (EVertAlignment align)
 Sets the vertical alignment for this BFont relative to the insertion point.
virtual BByteArray ToByteArray (void) const
 Stores this object in a BByteArray.
virtual ~BFont ()
 Destructor.

Constructor & Destructor Documentation

BFont (  )  [inline]

Default constructor.

BFont ( const BString face,
double  height 
) [inline]

Constructs a BFont with the specified face name and size.

Parameters:
face The face name for the font.
height The size of the font.

BFont ( const BFont f  )  [inline]

Copy constructor.

Parameters:
f The BFont object to copy.

virtual ~BFont (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual size_t ComputeSize ( void   )  const [virtual]

Computes the size of the BByteArray required to store this object.

Returns:
The size of the BByteArray.

Implements BByteStreamable.

virtual void FromByteArray ( const BByteArray bytes,
size_t &  startPos 
) [virtual]

Initializes an instance of this object from a BByteArray.

Parameters:
bytes The BByteArray containing the byte representation for this object.
startPos The position in the BByteArray where the byte representation begins. This value will be updated to point to the byte past the end of this object in the byte array.

Implements BByteStreamable.

BColor GetBGColor ( void   )  const [inline]

Gets the background color for this BFont.

Returns:
The background color for this BFont.

const BString& GetFaceName ( void   )  const [inline]

Gets the name of the font.

Returns:
The face name, e.g. "Arial".

BColor GetFGColor ( void   )  const [inline]

Get the foreground color for this BFont, which is the color of the text.

Returns:
The foreground color.

double GetHeight ( void   )  const [inline]

Gets the font height.

Returns:
The height value.

EHorzAlignment GetHorizontalAlignment ( void   )  const [inline]

Gets the horizontal alignment of this BFont relative to the insertion point.

Returns:
The horizontal alignment value.

BRotation GetRotation ( void   )  const [inline]

Gets the rotation angle for this BFont.

Use this method when getting the rotation for a BFont that exists in a three-dimensional space. To get the rotation angle for a BFont that exists in a two-dimensional space, use the GetRotationAngle method.

Returns:
The rotation angle.

double GetRotationAngle ( void   )  const [inline]

Gets the rotation angle for this BFont.

Use this method when getting the rotation for a BFont that exists in a two-dimensional space. To get the rotation angle for a BFont that exists in a three-dimensional space, use the GetRotation method.

Returns:
The rotation angle, in radians.

EVertAlignment GetVerticalAlignment ( void   )  const [inline]

Gets the vertical alignment of this BFont relative to the insertion point.

Returns:
The vertical alignment value.

bool IsBold ( void   )  const [inline]

Gets an indicator of whether or not this BFont is bold.

Returns:
True if this BFont is bold and false otherwise.

bool IsItalic ( void   )  const [inline]

Gets an indicator of whether or not this BFont is italic.

Returns:
True if this BFont is italic and false otherwise.

bool IsUnderlined ( void   )  const [inline]

Gets an indicator of whether or not this BFont is underlined.

Returns:
True if this BFont is underlined and false otherwise.

void SetBGColor ( const BColor color  )  [inline]

Sets the background color for this BFont.

Parameters:
color The background color.

void SetBold ( bool  val  )  [inline]

Sets an indicator of whether or not this BFont is bold.

Parameters:
val A value of true will indicates that this BFont should be bold, and a value of false indicates that this BFont should not be bold.

void SetFaceName ( const BString face  )  [inline]

Sets the name of the font.

Parameters:
face The face name, e.g. "Arial".

void SetFGColor ( const BColor color  )  [inline]

Sets the foreground color for this BFont, which is the color of the text.

Parameters:
color The foreground color.

void SetHeight ( double  height  )  [inline]

Sets the font height.

Parameters:
height The height value.

void SetHorizontalAlignment ( EHorzAlignment  align  )  [inline]

Sets the horizontal alignment for this BFont relative to the insertion point.

Parameters:
align The horizontal alignment value.

void SetItalic ( bool  val  )  [inline]

Sets an indicator of whether or not this BFont is italic.

Parameters:
val A value of true will indicates that this BFont should be italic, and a value of false indicates that this BFont should not be italic.

void SetRotation ( const BRotation rot  )  [inline]

Sets the rotation info for this BFont.

Use this method when setting the rotation for a BFont that exists in a three-dimensional space. To set the rotation angle for a BFont that exists in a Two-dimensional space, use the SetRotationAngle method.

Parameters:
rot The rotation angle.

void SetRotationAngle ( double  ang  )  [inline]

Sets the rotation angle for this BFont.

Use this method when setting the rotation for a BFont that exists in a two-dimensional space. To set the rotation angle for a BFont that exists in a three-dimensional space, use the SetRotation method.

Parameters:
ang The rotation angle, in radians.

void SetUnderlined ( bool  val  )  [inline]

Sets an indicator of whether or not this BFont is underlined.

Parameters:
val A value of true will indicates that this BFont should be underlined, and a value of false indicates that this BFont should not be underlined.

void SetVerticalAlignment ( EVertAlignment  align  )  [inline]

Sets the vertical alignment for this BFont relative to the insertion point.

Parameters:
align The vertical alignment value.

virtual BByteArray ToByteArray ( void   )  const [virtual]

Stores this object in a BByteArray.

Returns:
A BByteArray that stores the contents of this object.

Implements BByteStreamable.


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

GeoTranslate 5.0 From Blue Marble Geographics