Graphics.DrawString Method (String, Font, Pen, Brush, Point, Single[])

Draws the outlined text string at the specified location with the specified Font, Pen, and Brush settings.

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

Syntax

C#
public void DrawString(
	string string,
	Font font,
	Pen pen,
	Brush brush,
	Point point,
	float[] kernings
)

Parameters

string

Type: System.String

A string to draw.
font

Type: Aurigma.GraphicsMill.Drawing.Font

A Font that defines the text format of the string.
pen

Type: Aurigma.GraphicsMill.Drawing.Pen

A Pen that determines the color, width, and style of the text outline.
brush

Type: Aurigma.GraphicsMill.Drawing.Brush

A Brush that determines the color and texture of the drawn text.
point

Type: System.Drawing.Point

A Point structure that specifies the upper-left corner of the drawn text. Actual position of the text relatively this point is defined with HorizontalAlignment and VerticalAlignment properties of the font argument.
kernings

Type: System.Single[]

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

Remarks

The extent of the text drawn by this method can be measured using the MeasureString(String, Font) method.

Note

When you try to draw text on a grayscale bitmap, you will notice that the text is not antialiased. The reason of this problem is that neither GDI nor GDI+ support grayscale bitmaps, therefore Graphics Mill has to imitate it as indexed bitmap with grayscale palette. However, antialiasing is impossible on indexed bitmaps.

See Also

Reference