17 #ifndef GZ_RENDERING_BASE_BASETEXT_HH_
18 #define GZ_RENDERING_BASE_BASETEXT_HH_
28 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
43 public:
virtual void PreRender()
override;
46 public:
virtual void Destroy()
override;
49 public:
void SetFontName(
const std::string &_font)
override;
55 public:
virtual void SetTextString(
const std::string &_text)
override;
58 public:
virtual std::string TextString()
const override;
68 public:
virtual void SetCharHeight(
const float _height)
override;
71 public:
virtual float CharHeight()
const override;
74 public:
virtual void SetSpaceWidth(
const float _width)
override;
77 public:
virtual float SpaceWidth()
const override;
89 public:
virtual void SetBaseline(
const float _baseline)
override;
92 public:
virtual float Baseline()
const override;
95 public:
void SetShowOnTop(
const bool _onTop)
override;
98 public:
virtual bool ShowOnTop()
const override;
113 protected:
float charHeight = 1.0;
116 protected:
float spaceWidth = 0;
126 protected:
float baseline = 0;
130 protected:
bool onTop =
false;
133 protected:
bool textDirty =
false;
154 return this->fontName;
161 this->fontName = _font;
162 this->textDirty =
true;
177 this->textDirty =
true;
191 this->color = _color;
192 this->textDirty =
true;
199 return this->charHeight;
206 this->charHeight = _height;
207 this->textDirty =
true;
214 return this->spaceWidth;
221 this->spaceWidth = _width;
222 this->textDirty =
true;
229 return this->horizontalAlign;
236 return this->verticalAlign;
244 this->horizontalAlign = _horzAlign;
245 this->verticalAlign = _vertAlign;
246 this->textDirty =
true;
253 return this->baseline;
260 this->baseline = _baseline;
261 this->textDirty =
true;
275 this->onTop = _onTop;
276 this->textDirty =
true;