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





Measures the specified string when drawn with the specified Font object within the specified layout area.

Namespace: MindFusion.Drawing
Package: MindFusion.Common

 Syntax

C#  Copy Code

SizeF MeasureString (
    string text,
    Font font,
    SizeF layoutArea
)

Visual Basic  Copy Code

Function MeasureString( _
    text As String, _
    font As Font, _
    layoutArea As SizeF _
) As SizeF

 Parameters

text
The string to measure.
font
A .NET Font object defines the text format of the string.
layoutArea
A .NET SizeF structure that specifies the maximum layout area for the text.

 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

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