Font.MeasureString メソッド
[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 空白のトピックは、プレースホルダーとして挿入されています。]
指定した Font オブジェクトを使用し、指定した StringFormat オブジェクトで書式指定して描画した場合の、指定した文字列を計測します。
名前空間: Microsoft.WindowsMobile.DirectX.Direct3D
アセンブリ: Microsoft.WindowsMobile.DirectX (Microsoft.WindowsMobile.DirectX.dll 内)
構文
'宣言
Public Function MeasureString ( _
sprite As Sprite, _
value As String, _
ByRef rectangle As Rectangle, _
format As DrawTextFormat _
) As Rectangle
'使用
Dim instance As Font
Dim sprite As Sprite
Dim value As String
Dim rectangle As Rectangle
Dim format As DrawTextFormat
Dim returnValue As Rectangle
returnValue = instance.MeasureString(sprite, _
value, rectangle, format)
public Rectangle MeasureString(
Sprite sprite,
string value,
ref Rectangle rectangle,
DrawTextFormat format
)
public:
Rectangle MeasureString(
Sprite^ sprite,
String^ value,
Rectangle% rectangle,
DrawTextFormat format
)
member MeasureString :
sprite:Sprite *
value:string *
rectangle:Rectangle byref *
format:DrawTextFormat -> Rectangle
パラメーター
- sprite
型 : Microsoft.WindowsMobile.DirectX.Direct3D.Sprite
文字列を格納している Sprite。nullnull 参照 (Visual Basic では Nothing) を指定することもできます。その場合、Direct3D は独自のスプライト オブジェクトで文字列をレンダリングします。
- value
型 : System.String
計測対象の文字列。
- rectangle
型 : System.Drawing.Rectangle%
テキストが書式設定される四角形を論理座標で格納する Rectangle 構造体への参照。
- format
型 : Microsoft.WindowsMobile.DirectX.Direct3D.DrawTextFormat
テキストの書式設定方法。DrawTextFormat 列挙体の値の任意の組み合わせを使用できます。
戻り値
型 : System.Drawing.Rectangle
Rectangle 。
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分的に信頼される側のコードからライブラリの使用」を参照してください。
プラットフォーム
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。 サポートされているバージョンについては、「.NET フレームワークのシステム要件」を参照してください。
バージョン情報
.NET Compact Framework
サポート対象 : 3.5、2.0