Search
GdiGraphics.MeasureString Method (String, Font, Int32)
See Also
 





Measures the specified string when drawn with the specified Font object.

Namespace: MindFusion.Drawing
Package: MindFusion.Common

 Syntax

C#  Copy Code

public virtual SizeF MeasureString (
    string text,
    Font font,
    int width
)

Visual Basic  Copy Code

Public Overridable Function MeasureString( _
    text As String, _
    font As Font, _
    width As Integer _
) As SizeF

 Parameters

text
The string to measure.
font
A .NET Font object that defines the format of the string.
width
The maximum width of the string in pixels.

 Return Value

This method returns a .NET SizeF structure that represents the size, in pixels, of the string specified in the text parameter as drawn with the font parameter.

 See Also