8#ifndef META_OCEAN_RENDERING_TEXT_H
9#define META_OCEAN_RENDERING_TEXT_H
38class OCEAN_RENDERING_EXPORT
Text :
virtual public Shape
154 virtual std::string
text()
const;
167 virtual std::string
fontFamily(std::string* styleName =
nullptr)
const;
199 virtual void setText(
const std::string& text);
221 virtual void setFont(
const std::string& fontFamily,
const std::string& styleName = std::string());
293 virtual bool isFontAvailable(
const std::string& familyName,
const std::string& styleName = std::string())
const;
This class implements a 2D lookup object with values at the bins' corners defining the individual loo...
Definition Lookup2.h:636
ObjectType
Definition of different object type.
Definition Object.h:63
This class is the base class for all geometries.
Definition rendering/Shape.h:35
This class implements a smart rendering object reference.
Definition rendering/ObjectRef.h:34
This class is the base class for all texts.
Definition rendering/Text.h:39
virtual void setGeometryLookupTable(const LookupCorner2< Vector3 > &lookupTable)
Sets an explicit lookup table which will be used to determine the text geometry (the vertices of the ...
HorizontalAnchor
Definition of individual horizontal anchor points for the entire text block.
Definition rendering/Text.h:94
@ HA_CENTER
The text block is anchored at the center of the text block.
Definition rendering/Text.h:119
@ HA_LEFT
The text block is anchored at the left edge.
Definition rendering/Text.h:106
virtual std::string availableDefaultFont(std::string *styleName=nullptr) const
Returns the default front currently available.
virtual bool setSize(const Scalar fixedWidth, const Scalar fixedHeight, const Scalar fixedLineHeight)
Sets the size of the text.
AlignmentMode
Definition of individual alignment modes within the text block.
Definition rendering/Text.h:46
@ AM_CENTER
The text is aligned at the center of the text block.
Definition rendering/Text.h:73
@ AM_LEFT
The text is aligned to the left of the text block.
Definition rendering/Text.h:59
~Text() override
Destructs the text object.
Text()
Creates a new text object.
ObjectType type() const override
Returns the type of this object.
virtual std::vector< std::string > availableStyleNames(const std::string &familyName) const
Returns the style names of all available fonts with specified family name.
virtual void setBackgroundMaterial(const MaterialRef &material)
Returns the material which is used to render the background of the text.
virtual AlignmentMode alignmentMode() const
Returns the alignment mode of the text.
virtual void setVerticalAnchor(const VerticalAnchor verticalAnchor)
Sets the vertical anchor of the text.
virtual std::string text() const
Returns the text to be rendered.
virtual VerticalAnchor verticalAnchor() const
Returns the vertical anchor of the text.
virtual Vector2 size() const
Returns the actual width and height of the text.
VerticalAnchor
Definition of individual vertical anchor points for the entire text block.
Definition rendering/Text.h:139
@ VA_TOP
The text block is anchored at the top edge.
Definition rendering/Text.h:141
@ VA_MIDDLE
The text block is anchored at middle oft he text block.
Definition rendering/Text.h:143
virtual void setFont(const std::string &fontFamily, const std::string &styleName=std::string())
Sets the font to be used when rendering the text.
virtual HorizontalAnchor horizontalAnchor() const
Returns the horizontal anchor of the text.
virtual MaterialRef backgroundMaterial() const
Returns the material which is used to render the background of the text.
virtual std::vector< std::string > availableFamilyNames() const
Returns all available family names.
virtual std::string fontFamily(std::string *styleName=nullptr) const
Returns the font which is used to render the text.
virtual bool isFontAvailable(const std::string &familyName, const std::string &styleName=std::string()) const
Returns whether a specific font is currently available.
virtual void setAlignmentMode(const AlignmentMode alignmentMode)
Sets the alignment mode of the text.
virtual void setText(const std::string &text)
Sets the text to be rendred.
virtual void setHorizontalAnchor(const HorizontalAnchor horizontalAnchor)
Sets the horizontal anchor of the text.
float Scalar
Definition of a scalar type.
Definition Math.h:129
SmartObjectRef< Text > TextRef
Definition of a smart object reference holding a text.
Definition rendering/Text.h:32
The namespace covering the entire Ocean framework.
Definition Accessor.h:15