IGraphicsMeasureString Method

Measures the specified string when drawn with the specified FontInfo and formatted with the specified StringOptions.

Definition

Namespace: SMath.Drawing
Assembly: SMath.Drawing (in SMath.Drawing.dll) Version: 1.2.0
C#
SizeF MeasureString(
	string text,
	FontInfo font,
	float width,
	StringOptions format
)

Parameters

text  String
String to measure.
font  FontInfo
FontInfo that defines the text format of the string.
width  Single
Maximum width of the string.
format  StringOptions
StringOptions that represents formatting information, such as line spacing, for the string.

Return Value

SizeF
Returns a SizeF structure that represents the size, of the string specified in the text parameter as drawn with the font parameter and the StringOptions parameter.

See Also