class
TextRendererRenders Text data.
Contents
- Reference
Renders text data objects.
Base classes
Public types
- enum TextStyleType { STYLE_NORMAL, STYLE_BOLD, STYLE_ITALIC }
- enum TextPosition { POSITION_CENTER, POSITION_TOP_CENTER, POSITION_BOTTOM_CENTER, POSITION_BOTTOM_LEFT, POSITION_BOTTOM_RIGHT, POSITION_TOP_LEFT, POSITION_TOP_RIGHT }
- enum class PositionType { STANDARD = 0, VIEW, WORLD }
Public functions
- auto getBoundingBox(bool transform) -> DataBoundingBox override
- auto create(uint fontSize, Color color, TextStyleType type, TextPosition position, PositionType positionType) -> std::shared_ptr<TextRenderer>
- void setViewPosition(Vector2f position, float centerPosition = true)
- void setWorldPosition(Vector2f position, float centerPosition = true)
- void setFontHeightInMM(float heightInMillimeters)
- void setPositionType(PositionType position)
- void setFontSize(uint fontSize)
- void setColor(Color color)
- void setStyle(TextStyleType)
- void draw(Matrix4f perspectiveMatrix, Matrix4f viewingMatrix, float zNear, float zFar, bool mode2D, int viewWidth, int viewHeight) override
- void loadAttributes() virtual
Function documentation
void fast:: TextRenderer:: setViewPosition(Vector2f position,
float centerPosition = true)
Parameters | |
---|---|
position | |
centerPosition |
Set text position in normalization view position (x,y 0-1)
void fast:: TextRenderer:: setWorldPosition(Vector2f position,
float centerPosition = true)
Parameters | |
---|---|
position | |
centerPosition |
Set text position in world coordinates (millimeters)
void fast:: TextRenderer:: setFontHeightInMM(float heightInMillimeters)
Parameters | |
---|---|
heightInMillimeters |
Set font height in millimeters