Search
Diagram.MeasureString Method (String, Font, RectangleF, StringFormat, Int32@, Int32@)
See Also
 





Measures the specified text when drawn with the specified font in the specified rectangle area taking into consideration the current affine transform of the diagram.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public SizeF MeasureString (
    string text,
    Font font,
    RectangleF layoutArea,
    StringFormat stringFormat,
    out int charactersFitted,
    out int linesFilled
)

Visual Basic  Copy Code

Public Function MeasureString( _
    text As String, _
    font As Font, _
    layoutArea As RectangleF, _
    stringFormat As StringFormat, _
    <System.Runtime.InteropServices.Out()> ByRef charactersFitted As Integer, _
    <System.Runtime.InteropServices.Out()> ByRef linesFilled As Integer _
) As SizeF

 Parameters

text
The string to measure.
font
The font of the string.
layoutArea
A RectangleF structure that specifies the maximum layout area for the text.
stringFormat
A StringFormat object that represents formatting information, such as line spacing, for the string.
charactersFitted

linesFilled

 Return Value

This method returns a RectangleF structure that represents the size of the string text when drawn with the font parameter and the stringFormat parameter.

 See Also