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

Public Types | |
| enum | TextHint { EMPTY, SPECIAL, SHADOWED, OUTLINED_SOFT, OUTLINED_HARD } |
| The types of outlined texts. More... | |
Public Member Functions | |
| CombinedText (unsigned int estimatedElements=0) | |
| Only called by Factory Methods. | |
| virtual | ~CombinedText () |
| D-tor. | |
| VRS_SERIALIZABLE_CLASS_ENUM (TextHint) | |
| virtual TextHint | getTextHint () const |
| Returns a Hint for the Type of combined Text. | |
| virtual void | addText (SO< AbstractText > at, int layer) |
| Adds a new text to this CombinedText. | |
| virtual void | removeText (SO< AbstractText > at) |
| Removes a text from the CombinedText. | |
| 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< 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 Bounds | boundingBox () const |
| Bounds (with Matrix applied). | |
| virtual Bounds | getLocalBounds () const |
| Bounds (without Matrix applied). | |
| const SO< TextIter > | _getTexts () const |
| Returns a list of all the texts of this CombinedTexts Used only internal while rendering. | |
| VRS_TYPEINFO (CombinedText, Shape) | |
| VRS_SERIALIZABLE (CombinedText) | |
Static Public Member Functions | |
| static SO< CombinedText > | createOutlinedText (const Color &normalcol, const Color &outlinecol, const std::string &text, SO< FontDefinition > fdNormal, float outlineSize) |
| Helper method for creating a simple outlined text. | |
| static SO< CombinedText > | createSoftOutlinedText (const Color &normalcol, const Color &outlinecol, const std::string &text, SO< FontDefinition > fdNormal, float outlineSize, float softSize) |
| Helper method for creating a simple outlined text. | |
| static SO< CombinedText > | createShadowedText (const Color &normalcol, const Color &shadowcol, const std::string &text, SO< FontDefinition > fdNormal, const Vector &shadowOffset) |
| Helper method for creating a simple text with a shadow. | |
The types of outlined texts.
| EMPTY | No Texts. |
| SPECIAL | Not matching anything else. |
| SHADOWED | Shadow - Two passes, same FontDefinition. |
| OUTLINED_SOFT | Soft Outline - Two passes, different FontDefinitions. |
| OUTLINED_HARD | Hard Outline - Two passes, different FontDefinitions. |
| VRS::TEXT::CombinedText::CombinedText | ( | unsigned int | estimatedElements = 0 |
) |
Only called by Factory Methods.
| virtual VRS::TEXT::CombinedText::~CombinedText | ( | ) | [virtual] |
D-tor.
| static SO<CombinedText> VRS::TEXT::CombinedText::createOutlinedText | ( | const Color & | normalcol, | |
| const Color & | outlinecol, | |||
| const std::string & | text, | |||
| SO< FontDefinition > | fdNormal, | |||
| float | outlineSize | |||
| ) | [static] |
Helper method for creating a simple outlined text.
The outlines will be hard, but still antialised.
| normalcol | The color of the normal text | |
| outlinecol | The color of the outlines of the text | |
| text | The string for the text | |
| fdNormal | The fontdefinition for the normal text, based on this, a FontDefinition for the outlines will be generated. | |
| outlineSize | The width of the outline, in pixel |
| static SO<CombinedText> VRS::TEXT::CombinedText::createSoftOutlinedText | ( | const Color & | normalcol, | |
| const Color & | outlinecol, | |||
| const std::string & | text, | |||
| SO< FontDefinition > | fdNormal, | |||
| float | outlineSize, | |||
| float | softSize | |||
| ) | [static] |
Helper method for creating a simple outlined text.
The outlines will be softened.
| normalcol | The color of the normal text | |
| outlinecol | The color of the outlines of the text | |
| text | The string for the text | |
| fdNormal | The fontdefinition for the normal text, based on this, a FontDefinition for the outlines will be generated. | |
| outlineSize | The width of the outline, in pixel | |
| softSize | The amount of blur for the outlines, in pixel, usually smaller than outlineSize |
| static SO<CombinedText> VRS::TEXT::CombinedText::createShadowedText | ( | const Color & | normalcol, | |
| const Color & | shadowcol, | |||
| const std::string & | text, | |||
| SO< FontDefinition > | fdNormal, | |||
| const Vector & | shadowOffset | |||
| ) | [static] |
Helper method for creating a simple text with a shadow.
The shadow will be as sharp as the original font.
| normalcol | The color of the normal text | |
| shadowcol | The color of the shadow | |
| text | The string for the text | |
| fdNormal | The fontdefinition for the normal text, based on this, this FontDefinition will also be used for the shadow | |
| shadowOffset | The offset of the shadow |
| VRS::TEXT::CombinedText::VRS_SERIALIZABLE_CLASS_ENUM | ( | TextHint | ) |
| virtual TextHint VRS::TEXT::CombinedText::getTextHint | ( | ) | const [virtual] |
| virtual void VRS::TEXT::CombinedText::addText | ( | SO< AbstractText > | at, | |
| int | layer | |||
| ) | [virtual] |
Adds a new text to this CombinedText.
| at | The text to be added | |
| layer | The layer of this text, higher numbers will be rendered first |
| virtual void VRS::TEXT::CombinedText::removeText | ( | SO< AbstractText > | at | ) | [virtual] |
Removes a text from the CombinedText.
If the text does not exist, nothing happens.
| at | The text to be remove |
| virtual const std::string& VRS::TEXT::CombinedText::getText | ( | ) | const [virtual] |
| virtual void VRS::TEXT::CombinedText::setText | ( | const std::string & | str | ) | [virtual] |
| virtual SO<FontDefinition> VRS::TEXT::CombinedText::getFontDefinition | ( | ) | const [virtual] |
| virtual void VRS::TEXT::CombinedText::setFontDefinition | ( | SO< FontDefinition > | ) | [virtual] |
| virtual AbstractText::HorizontalAlignment VRS::TEXT::CombinedText::getHorizontalAlignment | ( | ) | const [virtual] |
Returns the Horizontal Alignment.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::CombinedText::setHorizontalAlignment | ( | AbstractText::HorizontalAlignment | tva | ) | [virtual] |
Sets the Horizontal Alignment.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::VerticalAlignment VRS::TEXT::CombinedText::getVerticalAlignment | ( | ) | const [virtual] |
Returns the Vertical Alignment.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::CombinedText::setVerticalAlignment | ( | AbstractText::VerticalAlignment | tva | ) | [virtual] |
Sets the Vertical Alignment.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::HorizontalDirection VRS::TEXT::CombinedText::getHorizontalDirection | ( | ) | const [virtual] |
Returns the Horizontal Direction.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::CombinedText::setHorizontalDirection | ( | AbstractText::HorizontalDirection | thd | ) | [virtual] |
Sets the Horizontal Direction.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::VerticalDirection VRS::TEXT::CombinedText::getVerticalDirection | ( | ) | const [virtual] |
Returns the Vertical Direction.
Implements VRS::TEXT::AbstractText.
| virtual void VRS::TEXT::CombinedText::setVerticalDirection | ( | AbstractText::VerticalDirection | thd | ) | [virtual] |
Sets the Vertical Direction.
Implements VRS::TEXT::AbstractText.
| virtual AbstractText::Direction VRS::TEXT::CombinedText::getDirection | ( | ) | const [virtual] |
| virtual void VRS::TEXT::CombinedText::setDirection | ( | AbstractText::Direction | td | ) | [virtual] |
| virtual void VRS::TEXT::CombinedText::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::CombinedText::setRightAlignmentBound | ( | float | rightBorder | ) | [virtual] |
| virtual void VRS::TEXT::CombinedText::setBottomAlignmentBound | ( | float | bottomBorder | ) | [virtual] |
| virtual float VRS::TEXT::CombinedText::getRightAlignmentBound | ( | ) | const [virtual] |
| virtual float VRS::TEXT::CombinedText::getBottomAlignmentBound | ( | ) | const [virtual] |
Returns the bottom alignement bound.
Implements VRS::TEXT::AbstractText.
| virtual float VRS::TEXT::CombinedText::getLineSpacing | ( | ) | const [virtual] |
| virtual void VRS::TEXT::CombinedText::setLineSpacing | ( | float | LineSpacing | ) | [virtual] |
| virtual void VRS::TEXT::CombinedText::setColor | ( | const Color & | color, | |
| bool | use = true | |||
| ) | [virtual] |
| virtual Color VRS::TEXT::CombinedText::getColor | ( | ) | const [virtual] |
| virtual bool VRS::TEXT::CombinedText::useColor | ( | ) | const [virtual] |
| virtual Matrix VRS::TEXT::CombinedText::getMatrix | ( | ) | const [virtual] |
| virtual void VRS::TEXT::CombinedText::setMatrix | ( | const Matrix & | m | ) | [virtual] |
| virtual Bounds VRS::TEXT::CombinedText::boundingBox | ( | ) | const [virtual] |
| virtual Bounds VRS::TEXT::CombinedText::getLocalBounds | ( | ) | const [virtual] |
Returns a list of all the texts of this CombinedTexts Used only internal while rendering.
| VRS::TEXT::CombinedText::VRS_TYPEINFO | ( | CombinedText | , | |
| Shape | ||||
| ) |
| VRS::TEXT::CombinedText::VRS_SERIALIZABLE | ( | CombinedText | ) |