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 向上させるために使用されます。

適用対象