Avogadro::Rendering::TextLabelBase#

class TextLabelBase : public Drawable#

The TextLabelBase class provides a generic implementation of a text drawable.

Subclassed by TextLabel2D, TextLabel3D

Unnamed Group

void setText(const std::string &str)#

The text that will be rendered.

const std::string &text() const#

The text that will be rendered.

Unnamed Group

void setTextProperties(const TextProperties &tprop)#

The properties of the rendered text.

const TextProperties &textProperties() const#

The properties of the rendered text.

Public Functions

TextLabelBase()#
TextLabelBase(const TextLabelBase &other)#
~TextLabelBase() override#
inline TextLabelBase &operator=(TextLabelBase other)#
virtual void render(const Camera &camera) override#

Render the contents of the drawable.

Parameters:

camera – The current Camera.

void buildTexture(const TextRenderStrategy &tren)#

Render the string to the internal texture buffer.

Parameters:

tren – The text rendering strategy to use.

void resetTexture()#

Clear the texture, forcing it to be regenerated on the next render.

Protected Functions

void setAnchorInternal(const Vector3f &anchor)#
Vector3f getAnchorInternal() const#
void setRadiusInternal(float radius)#
float getRadiusInternal() const#
void markDirty()#

Protected Attributes

std::string m_text#
TextProperties m_textProperties#
Vector2i m_imageDimensions#
Core::Array<unsigned char> m_imageRgba#

Friends

friend void swap(TextLabelBase &lhs, TextLabelBase &rhs)#