18 #ifndef INCLUDED_TEXTRENDERER 19 #define INCLUDED_TEXTRENDERER 74 void PrintfAt(
float x,
float y,
const wchar_t* fmt, ...);
86 void Put(
float x,
float y,
const wchar_t* buf);
93 void Put(
float x,
float y,
const char* buf);
101 void Put(
float x,
float y,
const std::wstring* buf);
162 void PutString(
float x,
float y,
const std::wstring* buf,
bool owned);
176 #endif // INCLUDED_TEXTRENDERER void PrintfAt(float x, float y, const wchar_t *fmt,...)
Print formatted text at (x,y) under the current transform.
Definition: TextRenderer.cpp:100
CVector2D m_Translate
Definition: TextRenderer.h:164
void PutString(float x, float y, const std::wstring *buf, bool owned)
Definition: TextRenderer.cpp:148
void Translate(float x, float y)
Definition: TextRenderer.cpp:54
void PutAdvance(const wchar_t *buf)
Print text at (0,0) under the current transform, and advance the transform by the width of the text...
Definition: TextRenderer.cpp:115
void Render(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::IShaderProgram *shader, const CVector2D &transformScale, const CVector2D &translation)
Render all of the previously printed text calls.
Definition: TextRenderer.cpp:196
A list of SBatchRuns, with a single font/color/transform, to be rendered in a single GL call...
Definition: TextRenderer.h:153
bool m_Dirty
Definition: TextRenderer.h:171
void SetCurrentColor(const CColor &color)
Set the color for subsequent print calls.
Definition: TextRenderer.cpp:65
std::list< SBatchRun > runs
Definition: TextRenderer.h:159
CColor m_Color
Definition: TextRenderer.h:167
CVector2D translate
Definition: TextRenderer.h:156
Definition: TextRenderer.h:33
float x
Definition: TextRenderer.h:143
void SetCurrentFont(CStrIntern font)
Set the font for subsequent print calls.
Definition: TextRenderer.cpp:74
Definition: Matrix3D.h:33
CColor color
Definition: TextRenderer.h:157
SBatchRun(const SBatchRun &str)
Definition: TextRenderer.h:128
float y
Definition: TextRenderer.h:143
const std::wstring * text
Definition: TextRenderer.h:145
std::shared_ptr< CFont > m_Font
Definition: TextRenderer.h:169
void Put(float x, float y, const wchar_t *buf)
Print text at (x,y) under the current transform.
Definition: TextRenderer.cpp:124
void PrintfAdvance(const wchar_t *fmt,...)
Print formatted text at (0,0) under the current transform, and advance the transform by the width of ...
Definition: TextRenderer.cpp:84
Interned 8-bit strings.
Definition: CStrIntern.h:37
size_t chars
Definition: TextRenderer.h:155
CRect m_Clipping
Definition: TextRenderer.h:165
Storage for a bitmap font.
Definition: Font.h:26
CTextRenderer()
Definition: TextRenderer.cpp:41
Definition: TextRenderer.cpp:185
IShaderProgram is a container for multiple shaders of different types.
Definition: IShaderProgram.h:80
Definition: Vector2D.h:31
const CVector2D & GetTranslate() const
Definition: TextRenderer.h:43
SBatchRun()
Definition: TextRenderer.h:123
bool owned
Definition: TextRenderer.h:146
SBatchRun & operator=(const SBatchRun &)
std::list< SBatch > m_Batches
Definition: TextRenderer.h:173
A string (optionally owned by this object, or else pointing to an externally-owned string) with a pos...
Definition: TextRenderer.h:118
void SetClippingRect(const CRect &rect)
Set clipping rectangle, in pre-transform coordinates (i.e.
Definition: TextRenderer.cpp:60
std::shared_ptr< CFont > font
Definition: TextRenderer.h:158
Definition: IDeviceCommandContext.h:40
void ResetTranslate(const CVector2D &translate=CVector2D{})
Reset the text transform to the default, with (0,0) in the top-left corner.
Definition: TextRenderer.cpp:48
CStrIntern m_FontName
Definition: TextRenderer.h:168
~SBatchRun()
Definition: TextRenderer.h:137
Rectangle class used for screen rectangles.
Definition: Rect.h:30