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

GraphicsCache.CalcTextSize Method

Name Parameters Description
CalcTextSize(String, Font, SizeF) text, font, layoutArea Calculates the size of the specified string when it’s drawn with the specified font.
CalcTextSize(String, Font, StringFormat, SizeF) text, font, format, layoutArea Calculates the size of the specified string when it’s drawn with the specified font and using the specified formatting.
CalcTextSize(String, Font, StringFormat, Int32, Int32, out Boolean) text, font, strFormat, maxWidth, maxHeight, isCropped Calculates the size of the specified string when it’s drawn with the specified font and using the specified formatting, fitting the string into a clipping rectangle. Allows you to determine whether the string does not fit the clipping rectangle.
CalcTextSize(String, Font, StringFormat, Int32, Int32) text, font, strFormat, maxWidth, maxHeight Calculates the size of the specified string when it’s drawn with the specified font and formatting, fitting the string into a clipping rectangle.
CalcTextSize(String, Font, StringFormat, Int32) text, font, strFormat, maxWidth Calculates the size of the specified string when it’s drawn with the specified font and using the specified formatting.
CalcTextSize(String, Font, Int32) text, font, maxWidth Calculates the size of the specified string when it’s drawn with the specified font.
CalcTextSize(String, Font) text, font Calculates the size of the specified string when it’s drawn with the specified font.