GraphicsExtensionsDrawString(IGraphics, String, FontInfo, ColorBrush, Single, Single) Method
Draws the specified text string at the specified location with the specified
ColorBrush and
FontInfo objects.
Namespace: SMath.DrawingAssembly: SMath.Drawing (in SMath.Drawing.dll) Version: 1.4.0.0
public static void DrawString(
this IGraphics g,
string text,
FontInfo font,
ColorBrush brush,
float x,
float y
)
<ExtensionAttribute>
Public Shared Sub DrawString (
g As IGraphics,
text As String,
font As FontInfo,
brush As ColorBrush,
x As Single,
y As Single
)
public:
[ExtensionAttribute]
static void DrawString(
IGraphics^ g,
String^ text,
FontInfo^ font,
ColorBrush^ brush,
float x,
float y
)
[<ExtensionAttribute>]
static member DrawString :
g : IGraphics *
text : string *
font : FontInfo *
brush : ColorBrush *
x : float32 *
y : float32 -> unit
- 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.
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).