Crazy Eddies GUI System: CEGUI::PixmapFont Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
CEGUI::PixmapFont Class Reference

Implementation of the Font class interface using static Imageset's. More...

Inheritance diagram for CEGUI::PixmapFont:
[legend]
Collaboration diagram for CEGUI::PixmapFont:
[legend]

List of all members.

## Public Member Functions
| PixmapFont (const String &font_name, const String &imageset_filename, const String &resource_group="", const bool auto_scaled=false, const float native_horz_res=640.0f, const float native_vert_res=480.0f)
| Constructor for Pixmap type fonts.
| ~PixmapFont ()
| Destructor.
void | defineMapping (const utf32 codepoint, const String &image_name, const float horz_advance)
const String & | getImageset () const
| Return the name of the imageset the font is using for it's glyphs.
void | setImageset (const String &imageset)
| Set Imageset the font is using for it's glyphs.
## Protected Member Functions
void | reinit ()
| Initialize the imageset.
void | addPixmapFontProperties ()
| Register all properties of this class.
void | updateFont ()
| Update the font as needed, according to the current parameters.
void | writeXMLToStream_impl (XMLSerializer &xml_stream) const
| implementaion version of writeXMLToStream.
## Protected Attributes
Imageset * | d_glyphImages
| The imageset with the glyphs.
float | d_origHorzScaling
| Current X scaling for glyph images.
bool | d_imagesetOwner
| true if we own the imageset

## Detailed Description

Implementation of the Font class interface using static Imageset's.

To create such a font you must create a Imageset with all the glyphs, and then define individual glyphs via defineMapping.

## Constructor & Destructor Documentation

CEGUI::PixmapFont::PixmapFont | ( | const String & | font_name,
|  | const String & | imageset_filename,
|  | const String & | resource_group = `""`,
|  | const bool | auto_scaled = `false`,
|  | const float | native_horz_res = `640.0f`,
|  | const float | native_vert_res = `480.0f`
| ) |  |

Constructor for Pixmap type fonts.

Parameters:

  font_name | The name that the font will use within the CEGUI system.
  imageset_filename | The filename of an imageset to load that will be used as the source for glyph images for this font. If resource_group is the special value of "*", this parameter may instead refer to the name of an already loaded Imagset.
  resource_group | The resource group identifier to use when loading the imageset file specified by imageset_filename. If this group is set to the special value of "*", then imageset_filename instead will refer to the name of an existing Imageset.
  auto_scaled | Specifies whether the font imagery should be automatically scaled to maintain the same physical size (which is calculated by using the native resolution setting).
  native_horz_res | The horizontal native resolution value. This is only significant when auto scaling is enabled.
  native_vert_res | The vertical native resolution value. This is only significant when auto scaling is enabled.

## Member Function Documentation

void CEGUI::PixmapFont::setImageset | ( | const String & | imageset | ) |

Set Imageset the font is using for it's glyphs.

This will potentially cause an existing imageset to be unloaded (if it was created specifically by, and for, this Font). The new Imageset must already exist within the system.

Parameters:

  imageset | Name ofan existing image set to be used as the glyph source for this Font.

Exceptions:

  UnknownObjectException | thrown if imageset is not known in the system.