Pyrogenesis
13997
|
#include <TextRenderer.h>
Classes | |
struct | SBatch |
Public Member Functions | |
CTextRenderer (const CShaderProgramPtr &shader) | |
void | ResetTransform () |
Reset the text transform to the default, with (0,0) in the top-left of the screen. More... | |
CMatrix3D | GetTransform () |
void | SetTransform (const CMatrix3D &transform) |
void | Translate (float x, float y, float z) |
void | Color (const CColor &color) |
Set the color for subsequent print calls. More... | |
void | Color (float r, float g, float b, float a=1.0) |
Set the color for subsequent print calls. More... | |
void | Font (const CStrW &font) |
Set the font for subsequent print calls. More... | |
void | PrintfAdvance (const wchar_t *fmt,...) |
Print formatted text at (0,0) under the current transform, and advance the transform by the width of the text. More... | |
void | PrintfAt (float x, float y, const wchar_t *fmt,...) |
Print formatted text at (x,y) under the current transform. More... | |
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. More... | |
void | Put (float x, float y, const wchar_t *buf) |
Print text at (x,y) under the current transform, and advance the transform by the width of the text. More... | |
void | Render () |
Render all of the previously printed text calls. More... | |
Private Attributes | |
CShaderProgramPtr | m_Shader |
CMatrix3D | m_Transform |
CColor | m_Color |
shared_ptr< CFont > | m_Font |
std::map< CStrW, shared_ptr < CFont > > | m_Fonts |
std::vector< SBatch > | m_Batches |
Definition at line 28 of file TextRenderer.h.
CTextRenderer::CTextRenderer | ( | const CShaderProgramPtr & | shader | ) |
Definition at line 29 of file TextRenderer.cpp.
void CTextRenderer::Color | ( | const CColor & | color | ) |
Set the color for subsequent print calls.
Definition at line 65 of file TextRenderer.cpp.
void CTextRenderer::Color | ( | float | r, |
float | g, | ||
float | b, | ||
float | a = 1.0 |
||
) |
Set the color for subsequent print calls.
Definition at line 70 of file TextRenderer.cpp.
void CTextRenderer::Font | ( | const CStrW & | font | ) |
Set the font for subsequent print calls.
Definition at line 75 of file TextRenderer.cpp.
CMatrix3D CTextRenderer::GetTransform | ( | ) |
Definition at line 48 of file TextRenderer.cpp.
void CTextRenderer::PrintfAdvance | ( | const wchar_t * | fmt, |
... | |||
) |
Print formatted text at (0,0) under the current transform, and advance the transform by the width of the text.
Definition at line 83 of file TextRenderer.cpp.
void CTextRenderer::PrintfAt | ( | float | x, |
float | y, | ||
const wchar_t * | fmt, | ||
... | |||
) |
Print formatted text at (x,y) under the current transform.
Does not alter the current transform.
Definition at line 99 of file TextRenderer.cpp.
void CTextRenderer::Put | ( | float | x, |
float | y, | ||
const wchar_t * | buf | ||
) |
Print text at (x,y) under the current transform, and advance the transform by the width of the text.
Definition at line 123 of file TextRenderer.cpp.
void CTextRenderer::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 at line 114 of file TextRenderer.cpp.
void CTextRenderer::Render | ( | ) |
Render all of the previously printed text calls.
Definition at line 146 of file TextRenderer.cpp.
void CTextRenderer::ResetTransform | ( | ) |
Reset the text transform to the default, with (0,0) in the top-left of the screen.
Definition at line 37 of file TextRenderer.cpp.
void CTextRenderer::SetTransform | ( | const CMatrix3D & | transform | ) |
Definition at line 53 of file TextRenderer.cpp.
void CTextRenderer::Translate | ( | float | x, |
float | y, | ||
float | z | ||
) |
Definition at line 58 of file TextRenderer.cpp.
|
private |
Definition at line 106 of file TextRenderer.h.
|
private |
Definition at line 101 of file TextRenderer.h.
|
private |
Definition at line 102 of file TextRenderer.h.
|
private |
Definition at line 104 of file TextRenderer.h.
|
private |
Definition at line 97 of file TextRenderer.h.
|
private |
Definition at line 99 of file TextRenderer.h.