次の方法で共有


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 は独自のスプライト オブジェクトで文字列をレンダリングします。

戻り値

型 : 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

参照

参照

Font クラス

Font メンバー

Microsoft.WindowsMobile.DirectX.Direct3D 名前空間