Measures the specified string when drawn with the specified Font and formatted with the specified StringFormat.
- g (Graphics)
- Graphics instance.
- text (String)
- String to measure.
- layoutArea (SizeF)
- SizeF structure that specifies the maximum layout area for the text.
- stringFormat (StringFormat)
- StringFormat that represents formatting information, such as line spacing, for the string.
This method returns a SizeF structure that represents the size, in the units specified by the PageUnit property, of the string specified by the text parameter as drawn with the font parameter.