PeachDrawing.Text
PeachDrawing.Text.Layout.ParagraphLayout
ParagraphLayout.SelectionBoxes(TextRange) Method
Finds the rectangles that cover a stretch of text, as a selection would be drawn.
public System.Collections.Generic.IReadOnlyList<System.Drawing.RectangleF> SelectionBoxes(PeachDrawing.Text.Layout.TextRange range);
Parameters
range TextRange
The text; a range whose end is before its start is taken the other way round. Hanging spaces and line-ending characters are not drawn, and so have no box.
Returns
System.Collections.Generic.IReadOnlyList<System.Drawing.RectangleF>
One rectangle for each stretch of a line that is selected and drawn without a gap; a range that spans right-to-left text can give several on one line.