Class TextRenderer
Encapsulates logic for laying out and then rendering text to a IGlyphRenderer surface.
public class TextRenderer
- Inheritance
-
TextRenderer
- Inherited Members
Constructors
TextRenderer(IGlyphRenderer)
Initializes a new instance of the TextRenderer class.
public TextRenderer(IGlyphRenderer renderer)
Parameters
rendererIGlyphRendererThe renderer.
Methods
RenderText(ReadOnlySpan<char>, TextOptions)
Renders the text to the configured renderer.
public void RenderText(ReadOnlySpan<char> text, TextOptions options)
Parameters
textReadOnlySpan<char>The text to render.
optionsTextOptionsThe text options. WrappingLength controls wrapping; use
-1to disable wrapping.
RenderText(string, TextOptions)
Renders the text to the configured renderer.
public void RenderText(string text, TextOptions options)
Parameters
textstringThe text to render.
optionsTextOptionsThe text options. WrappingLength controls wrapping; use
-1to disable wrapping.
RenderTextTo(IGlyphRenderer, ReadOnlySpan<char>, TextOptions)
Renders the text to the renderer.
public static void RenderTextTo(IGlyphRenderer renderer, ReadOnlySpan<char> text, TextOptions options)
Parameters
rendererIGlyphRendererThe target renderer.
textReadOnlySpan<char>The text to render.
optionsTextOptionsThe text options. WrappingLength controls wrapping; use
-1to disable wrapping.
RenderTextTo(IGlyphRenderer, string, TextOptions)
Renders the text to the renderer.
public static void RenderTextTo(IGlyphRenderer renderer, string text, TextOptions options)
Parameters
rendererIGlyphRendererThe target renderer.
textstringThe text to render.
optionsTextOptionsThe text options. WrappingLength controls wrapping; use
-1to disable wrapping.