[]
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)
| 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)
| 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)
| 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)
| 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)
| 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)
| 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. |
| Pen | pen | The pen to use. |