Skip to main content
A newer version of this page is available. .

GraphicsCache.CalcTextSize(String, Font, SizeF) Method

Calculates the size of the specified string when it’s drawn with the specified font.

Namespace: DevExpress.Utils.Drawing

Assembly: DevExpress.Utils.v18.2.dll

Declaration

public SizeF CalcTextSize(
    string text,
    Font font,
    SizeF layoutArea
)

Parameters

Name Type Description
text String

A String value which represents a string to measure.

font Font

A Font object which defines the font and the associated settings of the text.

layoutArea SizeF

A SizeF structure that specifies the maximum layout area for the text.

Returns

Type Description
SizeF

A SizeF structure which represents the size (in pixels) of the string.

See Also