Class GraphicsExtentions -
-Extensions for the System.Drawing.Graphics class.
-Inheritance
-Inherited Members
-Namespace: DesktopMagicPluginAPI.Drawing
-Assembly: DesktopMagicPluginAPI.dll
-Syntax
-public static class GraphicsExtentions
- Methods -
- - | - Improve this Doc - - - View Source - - -DrawStringFixedWidth(Graphics, String, Font, Brush, PointF, Single)
-Declaration
-public static void DrawStringFixedWidth(this Graphics graphics, string s, Font font, Brush brush, PointF point, float width)
- Parameters
-| Type | -Name | -Description | -
|---|---|---|
| System.Drawing.Graphics | -graphics | -Graphics object. - |
-
| System.String | -s | -String to draw. - |
-
| System.Drawing.Font | -font | -System.Drawing.Font that defines the text format of the string. - |
-
| System.Drawing.Brush | -brush | -System.Drawing.Brush that determines the color and texture of the drawn text. - |
-
| System.Drawing.PointF | -point | -System.Drawing.PointF structure that specifies the upper-left corner of the drawn text. - |
-
| System.Single | -width | -The specified width. - |
-
DrawStringFixedWidth(Graphics, String, Font, Brush, Single, Single, Single)
-Declaration
-public static void DrawStringFixedWidth(this Graphics graphics, string s, Font font, Brush brush, float x, float y, float width)
- Parameters
-| Type | -Name | -Description | -
|---|---|---|
| System.Drawing.Graphics | -graphics | -Graphics object. - |
-
| System.String | -s | -String to draw. - |
-
| System.Drawing.Font | -font | -System.Drawing.Font that defines the text format of the string. - |
-
| System.Drawing.Brush | -brush | -System.Drawing.Brush that determines the color and texture of the drawn text. - |
-
| System.Single | -x | -The x-coordinate of the upper-left corner of the drawn text. - |
-
| System.Single | -y | -The y-coordinate of the upper-left corner of the drawn text. - |
-
| System.Single | -width | -The specified width. - |
-
DrawStringMonospace(Graphics, String, Font, Brush, PointF)
-Declaration
-public static void DrawStringMonospace(this Graphics graphics, string s, Font font, Brush brush, PointF point)
- Parameters
-| Type | -Name | -Description | -
|---|---|---|
| System.Drawing.Graphics | -graphics | -Graphics object. - |
-
| System.String | -s | -String to draw. - |
-
| System.Drawing.Font | -font | -System.Drawing.Font that defines the text format of the string. - |
-
| System.Drawing.Brush | -brush | -System.Drawing.Brush that determines the color and texture of the drawn text. - |
-
| System.Drawing.PointF | -point | -System.Drawing.PointF structure that specifies the upper-left corner of the drawn text. - |
-
DrawStringMonospace(Graphics, String, Font, Brush, Single, Single)
-Declaration
-public static void DrawStringMonospace(this Graphics graphics, string s, Font font, Brush brush, float x, float y)
- Parameters
-| Type | -Name | -Description | -
|---|---|---|
| System.Drawing.Graphics | -graphics | -Graphics object. - |
-
| System.String | -s | -String to draw. - |
-
| System.Drawing.Font | -font | -System.Drawing.Font that defines the text format of the string. - |
-
| System.Drawing.Brush | -brush | -System.Drawing.Brush that determines the color and texture of the drawn text. - |
-
| System.Single | -x | -The x-coordinate of the upper-left corner of the drawn text. - |
-
| System.Single | -y | -The y-coordinate of the upper-left corner of the drawn text. - |
-
DrawStringNoLeftPadding(Graphics, String, Font, Brush, PointF)
-Declaration
-public static void DrawStringNoLeftPadding(this Graphics graphics, string s, Font font, Brush brush, PointF point)
- Parameters
-| Type | -Name | -Description | -
|---|---|---|
| System.Drawing.Graphics | -graphics | -Graphics object. - |
-
| System.String | -s | -String to draw. - |
-
| System.Drawing.Font | -font | -System.Drawing.Font that defines the text format of the string. - |
-
| System.Drawing.Brush | -brush | -System.Drawing.Brush that determines the color and texture of the drawn text. - |
-
| System.Drawing.PointF | -point | -System.Drawing.PointF structure that specifies the upper-left corner of the drawn text. - |
-
DrawStringNoLeftPadding(Graphics, String, Font, Brush, Single, Single)
-Declaration
-public static void DrawStringNoLeftPadding(this Graphics graphics, string s, Font font, Brush brush, float x, float y)
- Parameters
-| Type | -Name | -Description | -
|---|---|---|
| System.Drawing.Graphics | -graphics | -Graphics object. - |
-
| System.String | -s | -String to draw. - |
-
| System.Drawing.Font | -font | -System.Drawing.Font that defines the text format of the string. - |
-
| System.Drawing.Brush | -brush | -System.Drawing.Brush that determines the color and texture of the drawn text. - |
-
| System.Single | -x | -The x-coordinate of the upper-left corner of the drawn text. - |
-
| System.Single | -y | -The y-coordinate of the upper-left corner of the drawn text. - |
-
MeasureStringNoLeftPadding(Graphics, String, Font)
-Declaration
-public static SizeF MeasureStringNoLeftPadding(this Graphics graphics, string text, Font font)
- Parameters
-| Type | -Name | -Description | -
|---|---|---|
| System.Drawing.Graphics | -graphics | -Graphics object. - |
-
| System.String | -text | -String to measure. - |
-
| System.Drawing.Font | -font | -System.Drawing.Font that defines the text format of the string. - |
-
Returns
-| Type | -Description | -
|---|---|
| System.Drawing.SizeF | -- |