[]
Draws a line between two points, using a specified line color, width and style.
If the value of lineStyle parameter is not Solid, the line is drawn with a Pen having LineCap set to Square instead of Flat.
public void DrawLine(float x1, float y1, float x2, float y2, Color lineColor, float lineWidth, DashStyle lineStyle = DashStyle.Solid)
Public Sub DrawLine(x1 As Single, y1 As Single, x2 As Single, y2 As Single, lineColor As Color, lineWidth As Single, Optional lineStyle As DashStyle = DashStyle.Solid)
Type | Name | Description |
---|---|---|
float | x1 | The X coordinate of the first point. |
float | y1 | The Y coordinate of the first point. |
float | x2 | The X coordinate of the second point. |
float | y2 | The Y coordinate of the second point. |
Color | lineColor | The line color. |
float | lineWidth | The line width. |
DashStyle | lineStyle | The line style (solid by default). |
Draws a line between two points, using the specified line color, width and dash pattern.
If the dashPattern array contains two or more items, the line is drawn with a Pen having LineCap set to Square instead of Flat.
public void DrawLine(float x1, float y1, float x2, float y2, Color lineColor, float lineWidth, float[] dashPattern)
Public Sub DrawLine(x1 As Single, y1 As Single, x2 As Single, y2 As Single, lineColor As Color, lineWidth As Single, dashPattern As Single())
Type | Name | Description |
---|---|---|
float | x1 | The X coordinate of the first point. |
float | y1 | The Y coordinate of the first point. |
float | x2 | The X coordinate of the second point. |
float | y2 | The Y coordinate of the second point. |
Color | lineColor | The line color. |
float | lineWidth | The line width. |
float[] | dashPattern | The dash pattern. |
Draws a line between two points, using a specified line color, width and style.
If the value of lineStyle parameter is not Solid, the line is drawn with a Pen having LineCap set to Square instead of Flat.
public void DrawLine(PointF p1, PointF p2, Color lineColor, float lineWidth, DashStyle lineStyle = DashStyle.Solid)
Public Sub DrawLine(p1 As PointF, p2 As PointF, lineColor As Color, lineWidth As Single, Optional lineStyle As DashStyle = DashStyle.Solid)
Type | Name | Description |
---|---|---|
PointF | p1 | The first point. |
PointF | p2 | The second point. |
Color | lineColor | The line color. |
float | lineWidth | The line width. |
DashStyle | lineStyle | The line style (solid by default). |
Draws a line between two points, using the specified line color, width and dash pattern.
If the dashPattern array contains two or more items, the line is drawn with a Pen having LineCap set to Square instead of Flat.
public void DrawLine(PointF p1, PointF p2, Color lineColor, float lineWidth, float[] dashPattern)
Public Sub DrawLine(p1 As PointF, p2 As PointF, lineColor As Color, lineWidth As Single, dashPattern As Single())
Type | Name | Description |
---|---|---|
PointF | p1 | The first point. |
PointF | p2 | The second point. |
Color | lineColor | The line color. |
float | lineWidth | The line width. |
float[] | dashPattern | The dash pattern. |
Draws a line between two points, using the specified pen.
public void DrawLine(PointF p1, PointF p2, Pen pen)
Public Sub DrawLine(p1 As PointF, p2 As PointF, pen As Pen)
Type | Name | Description |
---|---|---|
PointF | p1 | The first point. |
PointF | p2 | The second point. |
Pen | pen | The pen to use. |
Draws a line between two points, using the specified pen.
public void DrawLine(float x1, float y1, float x2, float y2, Pen pen)
Public Sub DrawLine(x1 As Single, y1 As Single, x2 As Single, y2 As Single, pen As Pen)