Language

VisualStyleRenderer.GetTextExtent メソッド

定義

現在の visual スタイル要素のフォントで描画された場合の、指定した文字列のサイズと位置を返します。

オーバーロード

名前 説明
GetTextExtent(IDeviceContext, String, TextFormatFlags)

現在の visual スタイル要素のフォントで描画された場合の、指定した文字列のサイズと位置を返します。

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

指定した最初の外接する四角形内の現在の visual スタイル要素のフォントで描画された場合の、指定した文字列のサイズと位置を返します。

GetTextExtent(IDeviceContext, String, TextFormatFlags)

ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs

現在の visual スタイル要素のフォントで描画された場合の、指定した文字列のサイズと位置を返します。

public:
 System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);
public System.Drawing.Rectangle GetTextExtent(System.Drawing.IDeviceContext dc, string textToDraw, System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * string * System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle
Public Function GetTextExtent (dc As IDeviceContext, textToDraw As String, flags As TextFormatFlags) As Rectangle

パラメーター

dc
IDeviceContext

この操作で使用する IDeviceContext 。

textToDraw
String

測定する文字列。

flags
TextFormatFlags

TextFormatFlags値のビットごとの組み合わせ。

返品

レンダリングされたテキストに合わせて必要な領域を含む Rectangle 。

例外

dc は nullです。

適用対象

GetTextExtent(IDeviceContext, Rectangle, String, TextFormatFlags)

ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs

指定した最初の外接する四角形内の現在の visual スタイル要素のフォントで描画された場合の、指定した文字列のサイズと位置を返します。

public:
 System::Drawing::Rectangle GetTextExtent(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, System::Windows::Forms::TextFormatFlags flags);
public System.Drawing.Rectangle GetTextExtent(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, System.Windows.Forms.TextFormatFlags flags);
member this.GetTextExtent : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * System.Windows.Forms.TextFormatFlags -> System.Drawing.Rectangle
Public Function GetTextExtent (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, flags As TextFormatFlags) As Rectangle

パラメーター

dc
IDeviceContext

この操作で使用する IDeviceContext 。

bounds
Rectangle

Rectangleテキストのフローと折り返しを制御するために使用されます。

textToDraw
String

測定する文字列。

flags
TextFormatFlags

TextFormatFlags値のビットごとの組み合わせ。

返品

レンダリングされたテキストに合わせて必要な領域を含む Rectangle 。

例外

dc は nullです。

適用対象