| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/text/basetext.h>

Public Member Functions | |
| BaseText (SO< FontDefinition > fd, const std::string &text) | |
| BaseText (SO< FontDefinition > fd, BaseText *bt) | |
| virtual | ~BaseText () |
| virtual const std::string & | getText () const |
| Returns the text to be rendered. | |
| virtual const std::string & | getCachedText () const |
| Returns the cached text, with text direction already calculated. | |
| virtual void | setText (const std::string &str) |
| Sets the new text to be rendered. | |
| virtual SO< FontDefinition > | getFontDefinition () 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 void | setMatrix (AbstractText::TextPlane tp, const Vector &offset=Vector(0, 0, 0), const Vector &scale=Vector(1, 1, 1)) |
| Sets the local Matrix. | |
| virtual Bounds | boundingBox () const |
| Bounds (with Matrix applied). | |
| virtual Bounds | getLocalBounds () const |
| Bounds (without Matrix applied). | |
| const GlyphPositions | getCachedGlyphPositions () const |
| Returns the cached GlyphPositions. | |
| bool | isDirty () const |
| Should the text be rebuild. | |
| virtual void | rebuildAllCaches () |
| Refreshes all caches. | |
| virtual void | rebuildTextCache () |
| Refreshes the cached text (used with rendering Direction). | |
| virtual void | rebuildGlyphCache () |
| Refreshes the cached glyph positions. | |
| VRS_TYPEINFO (BaseText, Shape) | |
| VRS_SERIALIZABLE (BaseText) | |
Protected Member Functions | |
| BaseText () | |
| Constructor for persistency. | |
| virtual void | computeLineLengthAndWidth (std::vector< float > *lineWidths, float *totalWidth, float *totalHeight) const |
| Computes the size of the font by summing up all advances and font spacings. | |
Protected Attributes | |
| SO< FontDefinition > | m_FontDefinition |
| The FontDefinition. | |
| std::string | m_Text |
| The text to be rendered. | |
| std::string | m_CachedText |
| float | m_LineSpacing |
| Percentual Scale of the LineHeight. | |
| float | m_RightBorder |
| The right border of the Text. | |
| float | m_BottomBorder |
| The bottom border of the Text. | |
| Color | m_Color |
| The Color of this Text. | |
| bool | m_UseColor |
| Should the Color be used. | |
| AbstractText::HorizontalAlignment | m_HorizontalAlignment |
| The horizontal alignment of the text. | |
| AbstractText::VerticalAlignment | m_VerticalAlignment |
| The vertical alignment of the text. | |
| AbstractText::HorizontalDirection | m_HorizontalDirection |
| The horizontal direction of the text. | |
| AbstractText::VerticalDirection | m_VerticalDirection |
| The vertical direction of the text. | |
| AbstractText::Direction | m_Direction |
| The text direction. | |
| Matrix | m_Matrix |
| The Rotation of the Text. | |
| Bounds | m_CachedBounds |
| The cached bounds. | |
| GlyphPositions | m_CachedGlyphPositions |
| The cached positions of the glyph. | |
| bool | m_IsDirty |
| Needs redraw. | |
Provides no render methods, its only for convinience.
For usable Shape
| VRS::TEXT::BaseText::BaseText | ( | SO< FontDefinition > | fd, | |
| const std::string & | text | |||
| ) |
| VRS::TEXT::BaseText::BaseText | ( | SO< FontDefinition > | fd, | |
| BaseText * | bt | |||
| ) |
| virtual VRS::TEXT::BaseText::~BaseText | ( | ) | [virtual] |
| VRS::TEXT::BaseText::BaseText | ( | ) | [protected] |
Constructor for persistency.
| virtual const std::string& VRS::TEXT::BaseText::getText | ( | ) | const [virtual] |
| virtual const std::string& VRS::TEXT::BaseText::getCachedText | ( | ) | const [virtual] |
Returns the cached text, with text direction already calculated.
| virtual void VRS::TEXT::BaseText::setText | ( | const std::string & | str | ) | [virtual] |
| virtual SO<FontDefinition> VRS::TEXT::BaseText::getFontDefinition | ( | ) | const [virtual] |
| virtual void VRS::TEXT::BaseText::setFontDefinition | ( | SO< FontDefinition > | ) | [virtual] |
| virtual AbstractText::HorizontalAlignment VRS::TEXT::BaseText::getHorizontalAlignment | ( | ) | const [virtual] |
Returns the Horizontal Alignment.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::BaseText::setHorizontalAlignment | ( | AbstractText::HorizontalAlignment | tva | ) | [virtual] |
Sets the Horizontal Alignment.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::VerticalAlignment VRS::TEXT::BaseText::getVerticalAlignment | ( | ) | const [virtual] |
Returns the Vertical Alignment.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::BaseText::setVerticalAlignment | ( | AbstractText::VerticalAlignment | tva | ) | [virtual] |
Sets the Vertical Alignment.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::HorizontalDirection VRS::TEXT::BaseText::getHorizontalDirection | ( | ) | const [virtual] |
Returns the Horizontal Direction.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::BaseText::setHorizontalDirection | ( | AbstractText::HorizontalDirection | thd | ) | [virtual] |
Sets the Horizontal Direction.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::VerticalDirection VRS::TEXT::BaseText::getVerticalDirection | ( | ) | const [virtual] |
Returns the Vertical Direction.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::BaseText::setVerticalDirection | ( | AbstractText::VerticalDirection | thd | ) | [virtual] |
Sets the Vertical Direction.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::Direction VRS::TEXT::BaseText::getDirection | ( | ) | const [virtual] |
| virtual void VRS::TEXT::BaseText::setDirection | ( | AbstractText::Direction | td | ) | [virtual] |
| virtual void VRS::TEXT::BaseText::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::BaseText::setRightAlignmentBound | ( | float | rightBorder | ) | [virtual] |
| virtual void VRS::TEXT::BaseText::setBottomAlignmentBound | ( | float | bottomBorder | ) | [virtual] |
| virtual float VRS::TEXT::BaseText::getRightAlignmentBound | ( | ) | const [virtual] |
| virtual float VRS::TEXT::BaseText::getBottomAlignmentBound | ( | ) | const [virtual] |
Returns the bottom alignement bound.
Implements VRS::TEXT::AbstractText.
| virtual float VRS::TEXT::BaseText::getLineSpacing | ( | ) | const [virtual] |
| virtual void VRS::TEXT::BaseText::setLineSpacing | ( | float | LineSpacing | ) | [virtual] |
| virtual void VRS::TEXT::BaseText::setColor | ( | const Color & | color, | |
| bool | use = true | |||
| ) | [virtual] |
| virtual Color VRS::TEXT::BaseText::getColor | ( | ) | const [virtual] |
| virtual bool VRS::TEXT::BaseText::useColor | ( | ) | const [virtual] |
| virtual Matrix VRS::TEXT::BaseText::getMatrix | ( | ) | const [virtual] |
| virtual void VRS::TEXT::BaseText::setMatrix | ( | const Matrix & | m | ) | [virtual] |
Sets the local matrix for the text.
Implements VRS::TEXT::AbstractText.
Reimplemented in VRS::TEXT::TextureText.
| virtual void VRS::TEXT::BaseText::setMatrix | ( | AbstractText::TextPlane | tp, | |
| const Vector & | offset = Vector(0,0,0), |
|||
| const Vector & | scale = Vector(1,1,1) | |||
| ) | [inline, virtual] |
Sets the local Matrix.
| tp | Turns the text onto the given plane | |
| offset | The offset | |
| offset | The scaling |
Reimplemented from VRS::TEXT::AbstractText.
Reimplemented in VRS::TEXT::TextureText.
| virtual Bounds VRS::TEXT::BaseText::boundingBox | ( | ) | const [virtual] |
Bounds (with Matrix applied).
Implements VRS::TEXT::AbstractText.
Reimplemented in VRS::TEXT::DisplacedTextureText, and VRS::TEXT::TextureText.
| virtual Bounds VRS::TEXT::BaseText::getLocalBounds | ( | ) | const [virtual] |
| const GlyphPositions VRS::TEXT::BaseText::getCachedGlyphPositions | ( | ) | const |
Returns the cached GlyphPositions.
| bool VRS::TEXT::BaseText::isDirty | ( | ) | const |
Should the text be rebuild.
| virtual void VRS::TEXT::BaseText::rebuildAllCaches | ( | ) | [virtual] |
| virtual void VRS::TEXT::BaseText::rebuildTextCache | ( | ) | [virtual] |
Refreshes the cached text (used with rendering Direction).
| virtual void VRS::TEXT::BaseText::rebuildGlyphCache | ( | ) | [virtual] |
Refreshes the cached glyph positions.
| VRS::TEXT::BaseText::VRS_SERIALIZABLE | ( | BaseText | ) |
| virtual void VRS::TEXT::BaseText::computeLineLengthAndWidth | ( | std::vector< float > * | lineWidths, | |
| float * | totalWidth, | |||
| float * | totalHeight | |||
| ) | const [protected, virtual] |
Computes the size of the font by summing up all advances and font spacings.
| lineWidths | A pointer to a float vector, which will be filled with the length of all the lines | |
| totalWidth | A pointer to a float, which will be set to the maximum width of all lines | |
| totalHeight | A pointer to a float, which will be set to the to total height of the text |
SO<FontDefinition> VRS::TEXT::BaseText::m_FontDefinition [protected] |
The FontDefinition.
std::string VRS::TEXT::BaseText::m_Text [protected] |
The text to be rendered.
std::string VRS::TEXT::BaseText::m_CachedText [protected] |
float VRS::TEXT::BaseText::m_LineSpacing [protected] |
Percentual Scale of the LineHeight.
float VRS::TEXT::BaseText::m_RightBorder [protected] |
The right border of the Text.
float VRS::TEXT::BaseText::m_BottomBorder [protected] |
The bottom border of the Text.
Color VRS::TEXT::BaseText::m_Color [protected] |
bool VRS::TEXT::BaseText::m_UseColor [protected] |
Should the Color be used.
The horizontal alignment of the text.
The vertical alignment of the text.
The horizontal direction of the text.
The vertical direction of the text.
The text direction.
Matrix VRS::TEXT::BaseText::m_Matrix [protected] |
Bounds VRS::TEXT::BaseText::m_CachedBounds [protected] |
The cached bounds.
The cached positions of the glyph.
bool VRS::TEXT::BaseText::m_IsDirty [protected] |
Needs redraw.