Click or drag to resize

CanvasCalculateTextSize Method (String, Font, TextFormat)

Calculates the pixel size required to draw text using a specific font and text format.

Namespace:  Atalasoft.Imaging.Drawing
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public static Size CalculateTextSize(
	string text,
	Font font,
	TextFormat format
)

Parameters

text
Type: SystemString
The text string to evaluate.
font
Type: System.DrawingFont
The text font.
format
Type: Atalasoft.Imaging.DrawingTextFormat
The text formatting to apply.

Return Value

Type: Size
Returns the size of single line text without actually drawing it.
See Also