Method GetTextExtent
GetTextExtent(string, Font, IControl?)
Gets the dimensions of the string using the specified font.
public override SizeD GetTextExtent(string text, Font font, IControl? control)
Parameters
text
stringThe text string to measure.
font
FontThe Font used to get text dimensions.
control
IControlThe control used to get scaling factor. Can be null.
Returns
Remarks
This function only works with single-line strings. It works faster than MeasureText methods.
GetTextExtent(string, Font)
Gets the dimensions of the string using the specified font.
public override SizeD GetTextExtent(string text, Font font)
Parameters
Returns
Remarks
This function only works with single-line strings. It works faster than MeasureText methods.