version 3.3

VRS::TEXT::FontGlyph Class Reference

The mapping of a character to a texture-space Contains the uv coordinates, width, height, the texture and font-specific metrics. More...

#include <vrs/text/fontglyph.h>

Inheritance diagram for VRS::TEXT::FontGlyph:

VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 FontGlyph (unsigned int glyphCode, GlyphCharcode glyph, float width, float height, float horiBearingX, float horiBearingY, float horiAdvance, float vertBearingX, float vertBearingY, float vertAdvance, SO< FontDefinition > fd, SO< FontGlyph > inheritSize=0)
 Constructor.
virtual ~FontGlyph ()
 Destructor.
unsigned int getGlyphCode () const
 Returns the GlyphCode (id in a fontface).
GlyphCharcode getGlyph () const
 Returns the unicode character for this glyph.
float getWidth () const
 Returns the font-space width.
float getHeight () const
 Returns the font-space height.
float getExtraX () const
 Returns the increased width, when using a wider font as a border.
float getExtraY () const
 Returns the increased height, when using a wider font as a border.
float getHoriBearingX () const
 Returns the width from origin to the left edge of the font.
float getHoriBearingY () const
 Returns the height from baseline to the top edge of the font.
float getHoriAdvance () const
 The total width of the font.
float getVertBearingX () const
 Returns the width from origin to the left edge of the font.
float getVertBearingY () const
 Returns the height from baseline to the top edge of the font.
float getVertAdvance () const
 Returns the total width of the font.
SO< FontDefinitiongetFontDefinition () const
 Returns the FontDefinition.
void addGlyphRepresentation (SO< AbstractGlyph > glyph)
 Inserts a Glyph representation.
SO< AbstractGlyphgetGlyphRepresentation (GlyphTypeID id) const
 Returns a Glpyh representation for the given Glyph-Type Or NULL if none was found.
 VRS_TYPEINFO (FontGlyph, SharedObj)


Detailed Description

The mapping of a character to a texture-space Contains the uv coordinates, width, height, the texture and font-specific metrics.

Constructor & Destructor Documentation

VRS::TEXT::FontGlyph::FontGlyph ( unsigned int  glyphCode,
GlyphCharcode  glyph,
float  width,
float  height,
float  horiBearingX,
float  horiBearingY,
float  horiAdvance,
float  vertBearingX,
float  vertBearingY,
float  vertAdvance,
SO< FontDefinition fd,
SO< FontGlyph inheritSize = 0 
)

Constructor.

Parameters:
glyphCode The ID of the glyph for its Font
glyph The Character for the glyph
width The width of the Glyph
height The height of the Glyph
horiBearingX The width from origin to the left edge of the font
horiBearingY The height from baseline to the top edge of the font
horiAdvance The total width of the font
vertBearingX The width from origin to the left edge of the font
vertBearingY The height from baseline to the top edge of the font
vertAdvance The total height of the font
fd The fontdefinition to which this glyph belongs
inheritSize The new Fontglyph is destined to be placed with the given Fontglyph, used for matching different sized glyphs, like bold borders and normal text
If inheritSize is given, width, height, extraX and extraY will be derived from the baseglyph. If the font has no support for horizontal or vertical metrics, than those will be generated.

virtual VRS::TEXT::FontGlyph::~FontGlyph (  )  [virtual]

Destructor.


Member Function Documentation

unsigned int VRS::TEXT::FontGlyph::getGlyphCode (  )  const [inline]

Returns the GlyphCode (id in a fontface).

GlyphCharcode VRS::TEXT::FontGlyph::getGlyph (  )  const [inline]

Returns the unicode character for this glyph.

float VRS::TEXT::FontGlyph::getWidth (  )  const [inline]

Returns the font-space width.

float VRS::TEXT::FontGlyph::getHeight (  )  const [inline]

Returns the font-space height.

float VRS::TEXT::FontGlyph::getExtraX (  )  const [inline]

Returns the increased width, when using a wider font as a border.

float VRS::TEXT::FontGlyph::getExtraY (  )  const [inline]

Returns the increased height, when using a wider font as a border.

float VRS::TEXT::FontGlyph::getHoriBearingX (  )  const [inline]

Returns the width from origin to the left edge of the font.

float VRS::TEXT::FontGlyph::getHoriBearingY (  )  const [inline]

Returns the height from baseline to the top edge of the font.

float VRS::TEXT::FontGlyph::getHoriAdvance (  )  const [inline]

The total width of the font.

float VRS::TEXT::FontGlyph::getVertBearingX (  )  const [inline]

Returns the width from origin to the left edge of the font.

float VRS::TEXT::FontGlyph::getVertBearingY (  )  const [inline]

Returns the height from baseline to the top edge of the font.

float VRS::TEXT::FontGlyph::getVertAdvance (  )  const [inline]

Returns the total width of the font.

SO<FontDefinition> VRS::TEXT::FontGlyph::getFontDefinition (  )  const [inline]

Returns the FontDefinition.

void VRS::TEXT::FontGlyph::addGlyphRepresentation ( SO< AbstractGlyph glyph  ) 

Inserts a Glyph representation.

SO<AbstractGlyph> VRS::TEXT::FontGlyph::getGlyphRepresentation ( GlyphTypeID  id  )  const

Returns a Glpyh representation for the given Glyph-Type Or NULL if none was found.

VRS::TEXT::FontGlyph::VRS_TYPEINFO ( FontGlyph  ,
SharedObj   
)


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

Generated on Thu May 23 06:00:41 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact