Font.GetBlackBox Method (String, Single[])

Returns a rectangle that describes the string black box.

Namespace: Aurigma.GraphicsMill.Drawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public Rectangle GetBlackBox(
	string string,
	float[] kernings
)

Parameters

string

Type: System.String

The string to retrieve a black box for.
kernings

Type: System.Single[]

The array of kerning modifiers. The first entry of this array specifies an additional distance (may be negative) between the first and the second characters of the string; the second entry specifies additional distance between second and third character, etc.

Return Value

The string to retrieve a black box for.

Remarks

String black box is a tightest bounding rectangle of glyphs in cells of all characters in a string. This way you can calculate actual height of the character without any leading whitespaces.

See Also

Reference