Generates and renders a transparent texture with opaque text. More...
#include <TextWriter.h>
Public Member Functions | |
| bool | CreateTextImage () |
| Recreates the internal text image based on the input parameters. | |
| nuint | GetTextHeight () const |
| The height of the internal text image that was created. | |
| nuint | GetMaxViewWindowScroll () const |
| Retrieves the maximum value ViewWindowScroll can be set to, which is equivilent to scrolling to the bottom of the internal image. | |
| bool | CreateTexture () |
| Renders the internal text image to a texture based on the texture size and view window. This also updates the render properties. | |
| nuint | GetTextureWidth () |
| The width of the texture that was generated. | |
| nuint | GetTextureHeight () |
| The height of the texture that was generated. | |
| const Texture2D & | GetTexture () const |
| The texture used for rendering the text block. | |
| float | GetTexCoordUMin () const |
| The u texture coordinate representing the left side of the texture space to be rendered. | |
| float | GetTexCoordUMax () const |
| The u texture coordinate representing the right side of the texture space to be rendered. | |
| float | GetTexCoordVMin () const |
| The v texture coordinate representing the bottom side of the texture space to be rendered. | |
| float | GetTexCoordVMax () const |
| The v texture coordinate representing the top side of the texture space to be rendered. | |
| nuint | GetRenderWidth () const |
| The screen space width to render the texture at in order to attain 1-1 mapping with the intended text size. | |
| nuint | GetRenderHeight () const |
| The screen space height to render the texture at in order to attain 1-1 mapping with the intended text size. | |
| void | RenderTexture (float leftX, float topY) |
| This renders the text texture starting from the lower left location specified by x and y. This assumes the standard 2D projection transformation is already set. | |
| TextWriter (const TextWriter &other) | |
| copy constructor | |
| TextWriter (TextWriter &&other) | |
| move constructor | |
Static Public Member Functions | |
| static void | ClearFontCache () |
| Clears the internal cache of font images (every type and size combination ever rendered results in a set of images being stored for re-use). | |
Public Attributes | |
| EncodedText | Text |
| The text to render. | |
| nuint | FontSize |
| Size of font to render with. | |
| FontType | TextFont |
| Type of font to render with. | |
| nuint | TextWidth |
| The max width of the text image, in pixels, after which text will be wrapped to the next line. Set to 0 to disable wrapping. | |
| nuint | ViewWindowHeight |
| The height of the view window that will be placed onto the texture, or 0 to show all of it. | |
| nuint | ViewWindowScroll |
| This is a value between 0 (top) and GetMaxViewWindowScroll() (bottom) to control which horizontal section of the internal image to create the texture from. | |
| bool | DebugDrawBorder |
| Draws a border on th edges of the texture and the usable texture portions for debugging purposes. | |
Generates and renders a transparent texture with opaque text.
1.7.1