Class TextRenderer.TextArena
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
An append-only arena for building many formatted lines into one large backing buffer without allocating. Each TextRenderer.TextArena.Format(ref FormatHandler) returns its text as a TextRenderer.TextMemory slice that stays valid until the next TextRenderer.TextArena.Clear().
public sealed class TextRenderer.TextArenaInheritance
object ← TextRenderer.TextArena
Constructors
TextArena(int)
An append-only arena for building many formatted lines into one large backing buffer without allocating. Each TextRenderer.TextArena.Format(ref FormatHandler) returns its text as a TextRenderer.TextMemory slice that stays valid until the next TextRenderer.TextArena.Clear().
public TextArena(int capacity)Parameters
capacity int
Methods
Clear()
Discards all text, invalidating previously returned slices.
public void Clear()Format(ref FormatHandler)
Formats an interpolated string into the arena without allocating and returns the written slice. Text that does not fit the remaining space comes out empty.
public TextRenderer.TextMemory Format(ref TextRenderer.TextMemory.FormatHandler handler)Parameters
handler TextRenderer.TextMemory.FormatHandler

