PeachDrawing.Text

PeachDrawing.Text.Layout

ParagraphLayout Class

A paragraph laid out at one width: an immutable snapshot of the lines, with the queries an editor or a hit test needs.

public sealed class ParagraphLayout

Inheritance System.Object → ParagraphLayout

Properties  
ContentWidth The width of the widest line, with the distance its text is indented from the start edge.
Height The height of all the lines together.
IsTruncated Whether text was left out because MaxLines lines were full; the last line ends with Ellipsis (unless it is empty) and holds the rest of the text as hidden.
Lines The lines from top to bottom.
Paragraph The paragraph this is a layout of.
Width The width the paragraph was laid out at, or the width of the widest line when it was laid out without a limit.
Methods  
CaretRect(TextPosition) Finds where a caret at a position is drawn.
GraphemeRangeAt(int) The user-perceived character the character at index is part of (UAX #29).
PositionAt(PointF) Finds the text position nearest a point.
SelectionBoxes(TextRange) Finds the rectangles that cover a stretch of text, as a selection would be drawn.
WordRangeAt(int) The word the character at index is in, as a reader’s double-click would select it (UAX #29).