ASP.NET Pack Programmer's Guide
IGraphics.MeasureString Method (String, Font, Int32, StringFormat)
See Also
 





Measures the specified string when drawn with the specified Font object and formatted with the specified StringFormat object.

Namespace: MindFusion.Drawing
Package: MindFusion.Common

 Syntax

C#  Copy Code

SizeF MeasureString (
    string text,
    Font font,
    int width,
    StringFormat format
)

Visual Basic  Copy Code

Function MeasureString( _
    text As String, _
    font As Font, _
    width As Integer, _
    format As StringFormat _
) As SizeF

 Parameters

text
The string to measure.
font
A .NET Font object that defines the text format of the string.
width
The maximum width of the string.
format
A .NET StringFormat object that represents formatting information, such as line spacing, for the string.

 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 and the stringFormat parameter.

 See Also

MeasureString Method Overload List
IGraphics Members
IGraphics Interface
MindFusion.Drawing Namespace