version 3.3

VRS::TEXT::FontLodText Class Reference

A Lod Text, able to contain mutiple FontDefinitions that will be activated for a given text upon a specific distance or the size of the font on the screen. More...

#include <vrs/text/fontlodtext.h>

Inheritance diagram for VRS::TEXT::FontLodText:

VRS::TEXT::AbstractText VRS::Shape VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  LodMode {
  LM_NONE, LM_FIRST, LM_LAST, LM_DISTANCE,
  LM_SIZE
}
 Describes how the active FontDefinition will be determined. More...

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (LodMode)
 FontLodText (SO< AbstractText > at)
 Creates the FontLodText and inserts the FontDefinition of at as the first LodDefinition.
virtual ~FontLodText ()
 D-tor.
virtual void setAbstractText (SO< AbstractText > at)
 Sets the Text that will be used for rendering.
virtual SO< AbstractTextgetAbstractText () const
 Gets the Text that is used for rendering.
virtual void setLodMode (FontLodText::LodMode)
 Sets how the active FontDefinition will be determined.
virtual FontLodText::LodMode getLodMode () const
 Returns how the active FontDefinition will be determined.
virtual SO< FontDefinitiongetLodFontDefinition (unsigned int lodLevel) const
 Returns the FontDefinition for the given Level or NULL if none was found.
virtual unsigned int getNumLodLevels () const
 Returns the number of Lod.
virtual unsigned int getLodLevelByDistance (float distance) const
 Gets the Lod Level ID for a distance.
virtual unsigned int getLodLevelBySize (float size) const
 Gets the Lod Level ID for a size.
virtual void addLodLevel (SO< FontDefinition > fd, float lodstart=-1.0)
 Adds a FontDefinition for use in greater distance.
virtual void removeLodLevel (unsigned int level)
 Removes a lodlevel.
virtual void clearLodLevels ()
 Removes all Lod Levels.
virtual const std::string & getText () const
 Returns the text to be rendered.
virtual void setText (const std::string &str)
 Sets the new text to be rendered.
virtual SO< FontDefinitiongetFontDefinition () const
 Returns the FontDefinition.
virtual void setFontDefinition (SO< FontDefinition >)
 Sets the FontDefinition.
virtual
AbstractText::HorizontalAlignment 
getHorizontalAlignment () const
 Returns the Horizontal Alignment.
virtual void setHorizontalAlignment (AbstractText::HorizontalAlignment tva)
 Sets the Horizontal Alignment.
virtual
AbstractText::VerticalAlignment 
getVerticalAlignment () const
 Returns the Vertical Alignment.
virtual void setVerticalAlignment (AbstractText::VerticalAlignment tva)
 Sets the Vertical Alignment.
virtual
AbstractText::HorizontalDirection 
getHorizontalDirection () const
 Returns the Horizontal Direction.
virtual void setHorizontalDirection (AbstractText::HorizontalDirection thd)
 Sets the Horizontal Direction.
virtual
AbstractText::VerticalDirection 
getVerticalDirection () const
 Returns the Vertical Direction.
virtual void setVerticalDirection (AbstractText::VerticalDirection thd)
 Sets the Vertical Direction.
virtual AbstractText::Direction getDirection () const
 Returns the visible Direction.
virtual void setDirection (AbstractText::Direction td)
 Set the visible Direction.
virtual void setAlignmentBounds (float rightBorder, float bottomBorder)
 Sets the bottom and right bounds of the Text.
virtual void setRightAlignmentBound (float rightBorder)
 Sets the right alignement bound.
virtual void setBottomAlignmentBound (float bottomBorder)
 Sets the bottom alignement bound.
virtual float getRightAlignmentBound () const
 Returns the right alignement bound.
virtual float getBottomAlignmentBound () const
 Returns the bottom alignement bound.
virtual float getLineSpacing () const
 Returns the Scale of the inter line gap.
virtual void setLineSpacing (float LineSpacing)
 Sets the Scale of the inter line gap.
virtual void setColor (const Color &color, bool use=true)
 Sets the Color of this Text.
virtual Color getColor () const
 Returns the Color of this Text.
virtual bool useColor () const
 Should the Color be used.
virtual Matrix getMatrix () const
 Returns the local matrix for the text.
virtual void setMatrix (const Matrix &m)
 Sets the local matrix for the text.
virtual Bounds boundingBox () const
 Bounds (with Matrix applied).
virtual Bounds getLocalBounds () const
 Bounds (without Matrix applied).
 VRS_TYPEINFO (FontLodText, Shape)
 VRS_SERIALIZABLE (FontLodText)


Detailed Description

A Lod Text, able to contain mutiple FontDefinitions that will be activated for a given text upon a specific distance or the size of the font on the screen.

Member Enumeration Documentation

Describes how the active FontDefinition will be determined.

Enumerator:
LM_NONE 
LM_FIRST 
LM_LAST 
LM_DISTANCE 
LM_SIZE 


Constructor & Destructor Documentation

VRS::TEXT::FontLodText::FontLodText ( SO< AbstractText at  ) 

Creates the FontLodText and inserts the FontDefinition of at as the first LodDefinition.

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

D-tor.


Member Function Documentation

VRS::TEXT::FontLodText::VRS_SERIALIZABLE_CLASS_ENUM ( LodMode   ) 

virtual void VRS::TEXT::FontLodText::setAbstractText ( SO< AbstractText at  )  [virtual]

Sets the Text that will be used for rendering.

virtual SO<AbstractText> VRS::TEXT::FontLodText::getAbstractText (  )  const [virtual]

Gets the Text that is used for rendering.

virtual void VRS::TEXT::FontLodText::setLodMode ( FontLodText::LodMode   )  [virtual]

Sets how the active FontDefinition will be determined.

virtual FontLodText::LodMode VRS::TEXT::FontLodText::getLodMode (  )  const [virtual]

Returns how the active FontDefinition will be determined.

virtual SO<FontDefinition> VRS::TEXT::FontLodText::getLodFontDefinition ( unsigned int  lodLevel  )  const [virtual]

Returns the FontDefinition for the given Level or NULL if none was found.

virtual unsigned int VRS::TEXT::FontLodText::getNumLodLevels (  )  const [virtual]

Returns the number of Lod.

virtual unsigned int VRS::TEXT::FontLodText::getLodLevelByDistance ( float  distance  )  const [virtual]

Gets the Lod Level ID for a distance.

virtual unsigned int VRS::TEXT::FontLodText::getLodLevelBySize ( float  size  )  const [virtual]

Gets the Lod Level ID for a size.

Parameters:
size Size on the screen in pixels

virtual void VRS::TEXT::FontLodText::addLodLevel ( SO< FontDefinition fd,
float  lodstart = -1.0 
) [virtual]

Adds a FontDefinition for use in greater distance.

Parameters:
fd The FontDefinition to be used.
lodstart The distance at which the Fontdefinition will be used if < 0, then distance will be generated from lineheight
Returns:
The id of the added Lod level
Exceptions:
If the distance already exists

virtual void VRS::TEXT::FontLodText::removeLodLevel ( unsigned int  level  )  [virtual]

Removes a lodlevel.

virtual void VRS::TEXT::FontLodText::clearLodLevels (  )  [virtual]

Removes all Lod Levels.

virtual const std::string& VRS::TEXT::FontLodText::getText (  )  const [virtual]

Returns the text to be rendered.

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setText ( const std::string &  str  )  [virtual]

Sets the new text to be rendered.

Implements VRS::TEXT::AbstractText.

virtual SO<FontDefinition> VRS::TEXT::FontLodText::getFontDefinition (  )  const [virtual]

Returns the FontDefinition.

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setFontDefinition ( SO< FontDefinition  )  [virtual]

Sets the FontDefinition.

Implements VRS::TEXT::AbstractText.

virtual AbstractText::HorizontalAlignment VRS::TEXT::FontLodText::getHorizontalAlignment (  )  const [virtual]

Returns the Horizontal Alignment.

See also:
AbstractText::HorizontalAlignment

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setHorizontalAlignment ( AbstractText::HorizontalAlignment  tva  )  [virtual]

Sets the Horizontal Alignment.

See also:
AbstractText::HorizontalAlignment

Implements VRS::TEXT::AbstractText.

virtual AbstractText::VerticalAlignment VRS::TEXT::FontLodText::getVerticalAlignment (  )  const [virtual]

Returns the Vertical Alignment.

See also:
AbstractText::VerticalAlignment

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setVerticalAlignment ( AbstractText::VerticalAlignment  tva  )  [virtual]

Sets the Vertical Alignment.

See also:
AbstractText::VerticalAlignment

Implements VRS::TEXT::AbstractText.

virtual AbstractText::HorizontalDirection VRS::TEXT::FontLodText::getHorizontalDirection (  )  const [virtual]

Returns the Horizontal Direction.

See also:
AbstractText::HorizontalDirection

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setHorizontalDirection ( AbstractText::HorizontalDirection  thd  )  [virtual]

Sets the Horizontal Direction.

See also:
AbstractText::HorizontalDirection

Implements VRS::TEXT::AbstractText.

virtual AbstractText::VerticalDirection VRS::TEXT::FontLodText::getVerticalDirection (  )  const [virtual]

Returns the Vertical Direction.

See also:
AbstractText::VerticalDirection

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setVerticalDirection ( AbstractText::VerticalDirection  thd  )  [virtual]

Sets the Vertical Direction.

See also:
AbstractText::VerticalDirection

Implements VRS::TEXT::AbstractText.

virtual AbstractText::Direction VRS::TEXT::FontLodText::getDirection (  )  const [virtual]

Returns the visible Direction.

See also:
AbstractText::Direction

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setDirection ( AbstractText::Direction  td  )  [virtual]

Set the visible Direction.

See also:
AbstractText::Direction

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setAlignmentBounds ( float  rightBorder,
float  bottomBorder 
) [virtual]

Sets the bottom and right bounds of the Text.

Used for alignment and justification. If no alignment bounds are specified, the bounds that will be used is the position of the texts origin. This means that with AbstractText::RIGHT, the text will bei on the right side of the origin, or with AbstractText::CENTER and AbstractText::MIDDLE the cneter of the text will be on the origin.

If specified, the text will be aligned between the origin and the given borders.

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setRightAlignmentBound ( float  rightBorder  )  [virtual]

Sets the right alignement bound.

See also:
setAlignmentBounds

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setBottomAlignmentBound ( float  bottomBorder  )  [virtual]

Sets the bottom alignement bound.

See also:
setAlignmentBounds

Implements VRS::TEXT::AbstractText.

virtual float VRS::TEXT::FontLodText::getRightAlignmentBound (  )  const [virtual]

Returns the right alignement bound.

See also:
setAlignmentBounds

Implements VRS::TEXT::AbstractText.

virtual float VRS::TEXT::FontLodText::getBottomAlignmentBound (  )  const [virtual]

Returns the bottom alignement bound.

See also:
setAlignmentBounds

Implements VRS::TEXT::AbstractText.

virtual float VRS::TEXT::FontLodText::getLineSpacing (  )  const [virtual]

Returns the Scale of the inter line gap.

1.0 means 100%

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setLineSpacing ( float  LineSpacing  )  [virtual]

Sets the Scale of the inter line gap.

1.0 means 100%

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setColor ( const Color color,
bool  use = true 
) [virtual]

Sets the Color of this Text.

Implements VRS::TEXT::AbstractText.

virtual Color VRS::TEXT::FontLodText::getColor (  )  const [virtual]

Returns the Color of this Text.

Implements VRS::TEXT::AbstractText.

virtual bool VRS::TEXT::FontLodText::useColor (  )  const [virtual]

Should the Color be used.

Implements VRS::TEXT::AbstractText.

virtual Matrix VRS::TEXT::FontLodText::getMatrix (  )  const [virtual]

Returns the local matrix for the text.

Implements VRS::TEXT::AbstractText.

virtual void VRS::TEXT::FontLodText::setMatrix ( const Matrix m  )  [virtual]

Sets the local matrix for the text.

Implements VRS::TEXT::AbstractText.

virtual Bounds VRS::TEXT::FontLodText::boundingBox (  )  const [virtual]

Bounds (with Matrix applied).

Implements VRS::TEXT::AbstractText.

virtual Bounds VRS::TEXT::FontLodText::getLocalBounds (  )  const [virtual]

Bounds (without Matrix applied).

Implements VRS::TEXT::AbstractText.

VRS::TEXT::FontLodText::VRS_TYPEINFO ( FontLodText  ,
Shape   
)

VRS::TEXT::FontLodText::VRS_SERIALIZABLE ( FontLodText   ) 


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

Generated on Wed May 23 06:00:35 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact