#include <OpenGUI_Brush.h>
Public Member Functions | |
| void | drawText (const std::string &text, const FVector2 &position, Font &font, float spacing_adjust=0.0f) |
draws the given string of text at the given position, using the given font, and optionally adjusting the glyph spacing by spacing_adjust | |
| void | drawTextArea (const std::string &text, const FRect &area, Font &font, bool wrap=false, const TextAlignment alignment=TextAlignment()) |
| draws the given string within the given rect, using the given font, while applying the given text alignments and performing any necessary word wrapping | |
| void | drawCharacter (const char character, Font &font) |
draws the given character at the given position using the given font. | |
| IVector2 | pointsToPixels (float pointSize) |
Converts the given pointSize to the individual X and Y pixel sizes according to PPU and UPI. | |
Public Attributes | |
| FVector2 | PenPosition |
| The position that the next font glyph should be drawn to continue the last string of text. | |
| void OpenGUI::BrushText::drawCharacter | ( | const char | character, | |
| Font & | font | |||
| ) |
draws the given character at the given position using the given font.
| void OpenGUI::BrushText::drawText | ( | const std::string & | text, | |
| const FVector2 & | position, | |||
| Font & | font, | |||
| float | spacing_adjust = 0.0f | |||
| ) |
draws the given string of text at the given position, using the given font, and optionally adjusting the glyph spacing by spacing_adjust
| void OpenGUI::BrushText::drawTextArea | ( | const std::string & | text, | |
| const FRect & | area, | |||
| Font & | font, | |||
| bool | wrap = false, |
|||
| const TextAlignment | alignment = TextAlignment() | |||
| ) |
draws the given string within the given rect, using the given font, while applying the given text alignments and performing any necessary word wrapping
| IVector2 OpenGUI::BrushText::pointsToPixels | ( | float | pointSize | ) |
Converts the given pointSize to the individual X and Y pixel sizes according to PPU and UPI.
The position that the next font glyph should be drawn to continue the last string of text.
PenPosition is used by drawCharacter to support typewriter-like text operations.