Class TextLayout
Breaks text into the lines it is drawn as. Widths are in cells, so a wide character counts two and a combining mark none.
Assembly: DarkEffekt.Terminal.UI
Section titled “Assembly: DarkEffekt.Terminal.UI”public static class TextLayoutMethods
Section titled “Methods”Break(string, int, TextWrap, List<string>)
Section titled “Break(string, int, TextWrap, List<string>)”Adds the lines of a text to a list: one for each line feed, and more where a line wraps to a width. A width of zero or less, or TextWrap.None, wraps nothing.
public static void Break(string text, int width, TextWrap wrap, List<string> lines)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
text |
System.Int32 |
width |
| DarkEffekt.Terminal.UI.TextWrap | wrap |
System.Collections.Generic.List<System.String> |
lines |
Measure(string, int, TextWrap)
Section titled “Measure(string, int, TextWrap)”The cells a text takes when broken to a width: its widest line, and its lines.
public static CellSize Measure(string text, int width, TextWrap wrap)Returns
Section titled “Returns”DarkEffekt.Terminal.UI.CellSize
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.String |
text |
System.Int32 |
width |
| DarkEffekt.Terminal.UI.TextWrap | wrap |