![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GL/GlTextOverlay.h>
Renderer for displaying text as view overlay. More...
Renderer for displaying text as view overlay.
Public Member Functions | |
void | render (const GL::Viewport &viewport) override |
Render text overlay. | |
const std::string & | text () const |
Returns the text to render. | |
void | setText (const std::string &text) |
Sets the text to render. | |
const std::string & | hintingText () const |
Returns the optional text to use for computing size hints. | |
void | setHintingText (const std::string &value) |
Sets the optional text to use for computing size hints. | |
bool | isDrawBackgroundEnabled () const |
Returns whether a background is drawn below the text. | |
void | setDrawBackgroundEnabled (bool draw) |
Sets whether to draw background below the text. | |
int | backgroundMarginSize () const |
Returns the size of the background margin around the text. | |
void | setBackgroundMarginSize (int size) |
Sets the size of the background margin around the text. | |
vec4 | backgroundColor () const |
Returns the color of the background. | |
void | setBackgroundColor (const vec4 &color) |
Sets the color of the background. | |
const vec4 & | color () const |
Returns the text color. | |
void | setColor (const vec4 &color) |
Sets the text color. | |
const GL::TextRenderer::Font & | font () const |
Returns the font to use for rendering. | |
void | setFont (const GL::TextRenderer::Font &value) |
Sets the font to use for rendering. | |
void | setFontSize (int size) |
Convenience function to set font size. | |
void | setHorizontalAlignment (GL::TextRenderer::AlignmentH horizontalAlignment) |
Sets the horizontal alignment of the rendered text. | |
GL::TextRenderer::AlignmentH | horizontalAlignment () const |
Returns the horizontal alignment of the rendered text. | |
void | setVerticalAlignment (GL::TextRenderer::AlignmentV verticalAlignment) |
Sets the vertical alignment of the rendered text. | |
GL::TextRenderer::AlignmentV | verticalAlignment () const |
Returns the vertical alignment of the rendered text. | |
![]() | |
GlOverlay (int widthHint, int heightHint, int minWidthHint, int minHeightHint) | |
Instantiate a new GlOverlay with the given size hints. | |
virtual void | setVisible (bool visible) |
Set overlay visibility. | |
virtual bool | visible () const |
Return overlay visibility. | |
virtual void | setSizeHint (int width, int height) |
Sets the preferred size of the overlay for a DPI scaling of 1.0. | |
virtual int | sizeHintWidth () const |
Gets the preferred width of the overlay. | |
virtual int | sizeHintHeight () const |
Gets the preferred height of the overlay. | |
virtual void | setMinimalSizeHint (int width, int height) |
Sets the minimal size of the overlay for a DPI scaling of 1.0. | |
virtual int | minimalSizeHintWidth () const |
Gets the minimal width of the overlay. | |
virtual int | minimalSizeHintHeight () const |
Gets the minimal height of the overlay. | |
virtual void | update () |
updates any intermediate data the overlay uses for rendering | |
Protected Attributes | |
std::unique_ptr< Impl > | m_impl |
![]() | |
bool | m_visible = true |
Overlay visibility. | |
int | m_sizeHintWidth = 0 |
int | m_sizeHintHeight = 0 |
int | m_minSizeHintWidth = 0 |
int | m_minSizeHintHeight = 0 |
Additional Inherited Members | |
![]() | |
Signal< int, int > | m_sizeChangedSignal |
Signal emitted when the size hint has changed. | |
Signal< int, int > | m_minSizeChangedSignal |
Signal emitted when the minimum size hint has changed. | |
|
overridevirtual |
Render text overlay.
Implements GlOverlay.
void setFont | ( | const GL::TextRenderer::Font & | value | ) |
Sets the font to use for rendering.