Documents for PDF .NET Edition
GrapeCity.Documents.Imaging Assembly / GrapeCity.Documents.Drawing Namespace / GcGraphics Class / MeasureString Method / MeasureString(String,Font,Single,Nullable<Single>) Method
The string to measure.
The font to use.
The font size to use.
The width allocated to draw the string, or null to indicate unlimited width.

In This Topic
    MeasureString(String,Font,Single,Nullable<Single>) Method
    In This Topic
    Measures a string using a specified font, font size and layout width.
    Syntax
    'Declaration
     
    Public Overloads Function MeasureString( _
       ByVal text As System.String, _
       ByVal font As Font, _
       ByVal fontSize As System.Single, _
       Optional ByVal width As System.Nullable(Of Single) _
    ) As System.Drawing.SizeF
    public System.Drawing.SizeF MeasureString( 
       System.string text,
       Font font,
       System.float fontSize,
       System.Nullable<float> width
    )

    Parameters

    text
    The string to measure.
    font
    The font to use.
    fontSize
    The font size to use.
    width
    The width allocated to draw the string, or null to indicate unlimited width.

    Return Value

    The size needed to draw the string.
    See Also