TextFormatter.FormatLine 메서드

정의

문서 내용의 서식을 지정하고 문서 내용을 표시하는 데 사용하는 TextLine을 만듭니다.

오버로드

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak)

문서 내용의 서식을 지정하고 문서 내용을 표시하는 데 사용하는 TextLine을 만듭니다.

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache)

문서 내용의 서식을 지정하고 문서 내용을 표시하는 데 사용하는 TextLine을 만듭니다.

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak)

문서 내용의 서식을 지정하고 문서 내용을 표시하는 데 사용하는 TextLine을 만듭니다.

public:
 abstract System::Windows::Media::TextFormatting::TextLine ^ FormatLine(System::Windows::Media::TextFormatting::TextSource ^ textSource, int firstCharIndex, double paragraphWidth, System::Windows::Media::TextFormatting::TextParagraphProperties ^ paragraphProperties, System::Windows::Media::TextFormatting::TextLineBreak ^ previousLineBreak);
public abstract System.Windows.Media.TextFormatting.TextLine FormatLine (System.Windows.Media.TextFormatting.TextSource textSource, int firstCharIndex, double paragraphWidth, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak);
abstract member FormatLine : System.Windows.Media.TextFormatting.TextSource * int * double * System.Windows.Media.TextFormatting.TextParagraphProperties * System.Windows.Media.TextFormatting.TextLineBreak -> System.Windows.Media.TextFormatting.TextLine
Public MustOverride Function FormatLine (textSource As TextSource, firstCharIndex As Integer, paragraphWidth As Double, paragraphProperties As TextParagraphProperties, previousLineBreak As TextLineBreak) As TextLine

매개 변수

textSource
TextSource

줄의 텍스트 소스를 나타내는 TextSource 값입니다.

firstCharIndex
Int32

줄에서 시작 문자의 문자 인덱스를 지정하는 Int32 값입니다.

paragraphWidth
Double

줄로 채워지는 단락 너비를 지정하는 Double 값입니다.

paragraphProperties
TextParagraphProperties

흐름 방향, 맞춤, 들여쓰기 등의 단락 속성을 나타내는 TextParagraphProperties 값입니다.

previousLineBreak
TextLineBreak

단락의 이전 줄이 텍스트 서식 지정 프로세스에 의해 줄 바꿈되는 위치를 기준으로 텍스트 포맷터 상태를 지정하는 TextLineBreak 값입니다.

반환

TextLine

표시할 수 있는 텍스트 줄을 나타내는 TextLine 값입니다.

예제

다음 예제에서는 메서드를 사용하여 FormatLine 서식 TextLine이 지정된 메서드를 반환하는 방법을 보여줍니다.

// Create a textline from the text store using the TextFormatter object.
TextLine myTextLine = formatter.FormatLine(
    customTextSource,
    0,
    400,
    customTextParagraphProperties,
    null);

// Draw the formatted text into the drawing context.
myTextLine.Draw(drawingContext, new Point(0, 0), InvertAxes.None);
' Create a textline from the text store using the TextFormatter object.
Dim myTextLine As TextLine = formatter.FormatLine(customTextSource, 0, 400, customTextParagraphProperties, Nothing)

' Draw the formatted text into the drawing context.
myTextLine.Draw(drawingContext, New Point(0, 0), InvertAxes.None)

적용 대상

FormatLine(TextSource, Int32, Double, TextParagraphProperties, TextLineBreak, TextRunCache)

문서 내용의 서식을 지정하고 문서 내용을 표시하는 데 사용하는 TextLine을 만듭니다.

public:
 abstract System::Windows::Media::TextFormatting::TextLine ^ FormatLine(System::Windows::Media::TextFormatting::TextSource ^ textSource, int firstCharIndex, double paragraphWidth, System::Windows::Media::TextFormatting::TextParagraphProperties ^ paragraphProperties, System::Windows::Media::TextFormatting::TextLineBreak ^ previousLineBreak, System::Windows::Media::TextFormatting::TextRunCache ^ textRunCache);
public abstract System.Windows.Media.TextFormatting.TextLine FormatLine (System.Windows.Media.TextFormatting.TextSource textSource, int firstCharIndex, double paragraphWidth, System.Windows.Media.TextFormatting.TextParagraphProperties paragraphProperties, System.Windows.Media.TextFormatting.TextLineBreak previousLineBreak, System.Windows.Media.TextFormatting.TextRunCache textRunCache);
abstract member FormatLine : System.Windows.Media.TextFormatting.TextSource * int * double * System.Windows.Media.TextFormatting.TextParagraphProperties * System.Windows.Media.TextFormatting.TextLineBreak * System.Windows.Media.TextFormatting.TextRunCache -> System.Windows.Media.TextFormatting.TextLine
Public MustOverride Function FormatLine (textSource As TextSource, firstCharIndex As Integer, paragraphWidth As Double, paragraphProperties As TextParagraphProperties, previousLineBreak As TextLineBreak, textRunCache As TextRunCache) As TextLine

매개 변수

textSource
TextSource

줄의 텍스트 소스를 나타내는 TextSource 개체입니다.

firstCharIndex
Int32

줄에서 시작 문자의 문자 인덱스를 지정하는 Int32 값입니다.

paragraphWidth
Double

줄로 채워지는 단락 너비를 지정하는 Double 값입니다.

paragraphProperties
TextParagraphProperties

흐름 방향, 맞춤, 들여쓰기 등의 단락 속성을 나타내는 TextParagraphProperties 개체입니다.

previousLineBreak
TextLineBreak

단락의 이전 줄이 텍스트 서식 지정 프로세스에 의해 줄 바꿈되는 위치를 기준으로 텍스트 포맷터 상태를 지정하는 TextLineBreak 개체입니다.

textRunCache
TextRunCache

텍스트 레이아웃의 캐싱 메커니즘을 나타내는 TextRunCache 개체입니다.

반환

TextLine

표시할 수 있는 텍스트 줄을 나타내는 TextLine 값입니다.

설명

애플리케이션에서 성능 향상을 위해이 메서드는 사용 위치를 TextLine 성능이 크게 영향을 미칩니다.

적용 대상