TextFormatter.

FormatLine(ITextSource, int, double, TextParagraphProperties, TextLineBreak) Method

Summary

Formats a text line.
Namespace
Avalonia.Media.TextFormatting
Containing Type
TextFormatter

Syntax

public abstract TextLine FormatLine(ITextSource textSource, int firstTextSourceIndex, double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak = null)

Parameters

Name Type Description
textSource ITextSource The text source.
firstTextSourceIndex int The first character index to start the text line from.
paragraphWidth double A double value that specifies the width of the paragraph that the line fills.
paragraphProperties TextParagraphProperties A TextParagraphProperties value that represents paragraph properties, such as TextWrapping, TextAlignment, or TextStyle.
previousLineBreak TextLineBreak A TextLineBreak value that specifies the text formatter state, in terms of where the previous line in the paragraph was broken by the text formatting process.

Return Value

Type Description
TextLine The formatted line.