new function TextMetrics::clearText() (#1046)
This commit is contained in:
parent
d72aff9e5d
commit
b0eac0a809
@ -10,12 +10,13 @@
|
||||
|
||||
TextMetrics::TextMetrics(FontManager* _fontManager)
|
||||
: m_fontManager(_fontManager)
|
||||
, m_width(0)
|
||||
, m_height(0)
|
||||
, m_x(0)
|
||||
, m_lineHeight(0)
|
||||
, m_lineGap(0)
|
||||
{
|
||||
clearText();
|
||||
}
|
||||
|
||||
void TextMetrics::clearText()
|
||||
{
|
||||
m_width = m_height = m_x = m_lineHeight = m_lineGap = 0;
|
||||
}
|
||||
|
||||
void TextMetrics::appendText(FontHandle _fontHandle, const char* _string)
|
||||
|
@ -25,6 +25,9 @@ public:
|
||||
/// Return the height of the measured text.
|
||||
float getHeight() const { return m_height; }
|
||||
|
||||
/// Clear the width and height of the measured text.
|
||||
void clearText();
|
||||
|
||||
private:
|
||||
FontManager* m_fontManager;
|
||||
float m_width;
|
||||
|
Loading…
Reference in New Issue
Block a user