[]
Draws a rectangle using a specified line color, width and style.
If the value of lineStyle parameter is not Solid, the rectangle is drawn with a Pen having LineCap set to Square instead of Flat.
public void DrawRectangle(RectangleF bounds, Color lineColor, float lineWidth, DashStyle lineStyle = DashStyle.Solid)
Public Sub DrawRectangle(bounds As RectangleF, lineColor As Color, lineWidth As Single, Optional lineStyle As DashStyle = DashStyle.Solid)
Type | Name | Description |
---|---|---|
RectangleF | bounds | A RectangleF structure that represents the rectangle to draw. |
Color | lineColor | The color of lines used to draw the rectangle. |
float | lineWidth | The width of lines used to draw the rectangle. |
DashStyle | lineStyle | The style of lines used to draw the rectangle (solid by default). |
Draws a rectangle using a specified line color, width and dash pattern.
If the dashPattern array contains two or more items, the rectangle is drawn with a Pen having LineCap set to Square instead of Flat.
public void DrawRectangle(RectangleF bounds, Color lineColor, float lineWidth, float[] dashPattern)
Public Sub DrawRectangle(bounds As RectangleF, lineColor As Color, lineWidth As Single, dashPattern As Single())
Type | Name | Description |
---|---|---|
RectangleF | bounds | A RectangleF structure that represents the rectangle to draw. |
Color | lineColor | The color of lines used to draw the rectangle. |
float | lineWidth | The width of lines used to draw the rectangle. |
float[] | dashPattern | The dash pattern lines used to draw the rectangle. |
Draws a rectangle using a specified pen.
public void DrawRectangle(RectangleF bounds, Pen pen)
Public Sub DrawRectangle(bounds As RectangleF, pen As Pen)
Type | Name | Description |
---|---|---|
RectangleF | bounds | A RectangleF structure that represents the rectangle to draw. |
Pen | pen | The pen used to draw the rectangle. |