GraphicsExtensionsDrawString(IGraphics, String, FontInfo, ColorBrush, Single, Single) Method

Draws the specified text string at the specified location with the specified ColorBrush and FontInfo objects.

Definition

Namespace: SMath.Drawing
Assembly: SMath.Drawing (in SMath.Drawing.dll) Version: 1.2.0
C#
public static void DrawString(
	this IGraphics g,
	string text,
	FontInfo font,
	ColorBrush brush,
	float x,
	float y
)

Parameters

g  IGraphics
text  String
String to draw.
font  FontInfo
FontInfo that defines the text format of the string.
brush  ColorBrush
ColorBrush that determines the color and texture of the drawn text.
x  Single
The x-coordinate of the upper-left corner of the drawn text.
y  Single
The y-coordinate of the upper-left corner of the drawn text.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IGraphics. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also