MobileForms Toolkit Documentation

GraphicsEx.MeasureString Method (Graphics, String, Font, Int32, Boolean, SizeF)

Measures the specified string when drawn with the specified Font scaled by the specified scale factor.

public static Size MeasureString(
Graphics gr,
string text,
Font font,
int maxWidth,
bool rightToLeftWrap,
SizeF scaleFactor
);

Parameters

gr
Graphics to use.
text
String to measure.
font
Font that defines the format of the string.
maxWidth
Maximum width of the string in pixels.
rightToLeftWrap
true to use right-to-left word wrap, otherwise false.
scaleFactor
A SizeF containing the horizontal and vertical scaling factors.

Return Value

This method returns a Size structure that represents the size, of the string specified in the text parameter as drawn with the font parameter.

See Also

GraphicsEx Class | Resco.Drawing Namespace | GraphicsEx.MeasureString Overload List