PeachDrawing.Text
PeachDrawing.Text.Unicode
BidiAnalysis Class
What Analyze(string, BaseDirection, IReadOnlyList<EmbeddingSpan>) found out about one paragraph: an embedding level for every UTF-16 code unit of the text, and the paragraph’s own level.
public sealed class BidiAnalysis
Inheritance System.Object → BidiAnalysis
Remarks
A low surrogate always repeats the level of the high surrogate before it, so a character outside the Basic Multilingual Plane never splits a level run. The paragraph level seeds the line-level resets of UAX #9 rule L1, and is how a caller that asked for Auto learns which direction the text turned out to have.
| Properties | |
|---|---|
| IsParagraphRtl | Whether the paragraph as a whole reads right to left. |
| Levels | The resolved embedding level of each UTF-16 code unit of the analysed text. |
| ParagraphLevel | The paragraph’s embedding level: 0 for a left-to-right paragraph, 1 for a right-to-left one. |