GraphicsExtensionsDrawString(IGraphics, String, FontInfo, ColorBrush, Single, Single, StringOptions) Method
Draws the specified text string at the specified location with the specified
ColorBrush and
FontInfo objects using the formatting attributes of the specified
StringOptions.
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,
StringOptions format
)
<ExtensionAttribute>
Public Shared Sub DrawString (
g As IGraphics,
text As String,
font As FontInfo,
brush As ColorBrush,
x As Single,
y As Single,
format As StringOptions
)
public:
[ExtensionAttribute]
static void DrawString(
IGraphics^ g,
String^ text,
FontInfo^ font,
ColorBrush^ brush,
float x,
float y,
StringOptions^ format
)
[<ExtensionAttribute>]
static member DrawString :
g : IGraphics *
text : string *
font : FontInfo *
brush : ColorBrush *
x : float32 *
y : float32 *
format : StringOptions -> 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.
- format StringOptions
- StringOptions that specifies formatting attributes, such as line spacing and alignment, that are applied to 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).