Avogadro::Rendering::TextProperties#
-
class TextProperties#
The TextProperties class controls formatting options for text.
Unnamed Group
-
inline void setColorRgba(unsigned char r, unsigned char g, unsigned char b, unsigned char a)#
Set the color of the text. Components are in the range [0, 255]
-
inline void setColorRgba(const unsigned char rgba[4])#
Set the color of the text. Components are in the range [0, 255]
-
inline void setColorRgba(const Vector4ub &rgba)#
Set the color of the text. Components are in the range [0, 255]
-
inline void colorRgba(unsigned char rgba[4]) const#
Set the color of the text. Components are in the range [0, 255]
-
inline Vector4ub colorRgba() const#
Set the color of the text. Components are in the range [0, 255]
-
inline void setColorRgb(unsigned char r, unsigned char g, unsigned char b)#
Set the color of the text. Components are in the range [0, 255]
-
inline void setColorRgb(const unsigned char rgb[3])#
Set the color of the text. Components are in the range [0, 255]
-
inline void setColorRgb(const Vector3ub &rgb)#
Set the color of the text. Components are in the range [0, 255]
-
inline void colorRgb(unsigned char rgb[3]) const#
Set the color of the text. Components are in the range [0, 255]
-
inline Vector3ub colorRgb() const#
Set the color of the text. Components are in the range [0, 255]
-
inline void setRed(unsigned char r)#
Set the color of the text. Components are in the range [0, 255]
-
inline unsigned char red() const#
Set the color of the text. Components are in the range [0, 255]
-
inline void setGreen(unsigned char g)#
Set the color of the text. Components are in the range [0, 255]
-
inline unsigned char green() const#
Set the color of the text. Components are in the range [0, 255]
-
inline void setBlue(unsigned char b)#
Set the color of the text. Components are in the range [0, 255]
-
inline unsigned char blue() const#
Set the color of the text. Components are in the range [0, 255]
-
inline void setAlpha(unsigned char a)#
Set the color of the text. Components are in the range [0, 255]
-
inline unsigned char alpha() const#
Set the color of the text. Components are in the range [0, 255]
Public Types
-
enum FontFamily#
Enum defining a minimal set of font families.
Values:
-
enumerator SansSerif#
-
enumerator Serif#
-
enumerator Mono#
-
enumerator SansSerif#
-
enum HAlign#
Horizontal alignment options.
Values:
-
enumerator HLeft#
-
enumerator HCenter#
-
enumerator HRight#
-
enumerator HLeft#
-
enum VAlign#
Vertical alignment options.
Values:
-
enumerator VTop#
-
enumerator VCenter#
-
enumerator VBottom#
-
enumerator VTop#
-
enum FontStyle#
Flags for style options (bold, italic, …)
Values:
-
enumerator NoFontStyle#
-
enumerator Bold#
-
enumerator Italic#
-
enumerator Underline#
-
enumerator NoFontStyle#
-
typedef int FontStyles#
Used for bitwise combinations of FontStyle values.
Public Functions
-
TextProperties()#
-
TextProperties(const TextProperties &other)#
-
~TextProperties()#
-
TextProperties &operator=(TextProperties other)#
-
void swap(TextProperties &other)#
-
bool operator==(const TextProperties &other) const#
-
inline bool operator!=(const TextProperties &other) const#
-
inline void setPixelHeight(size_t height)#
The height of the text in pixels.
-
inline size_t pixelHeight() const#
-
inline void setAlign(HAlign hAlign, VAlign vAlign)#
Set the horizontal and vertical alignment of the quad to the anchor point.
-
inline void setRotationDegreesCW(float rot)#
Rotates the text clockwise.
-
inline float rotationDegreesCW() const#
-
inline void setFontFamily(FontFamily family)#
The font family.
-
inline FontFamily fontFamily() const#
-
inline void setFontStyles(FontStyles styles)#
Font style flags.
-
inline FontStyles fontStyles() const#
-
inline void setBold(bool b)#
Toggle bold text.
-
inline bool bold() const#
-
inline void setItalic(bool b)#
Toggle italic text.
-
inline bool italic() const#
-
inline void setUnderline(bool b)#
Toggle underlined text.
-
inline bool underline() const#
-
inline void setColorRgba(unsigned char r, unsigned char g, unsigned char b, unsigned char a)#