[]
Draws a line connecting the two points specified by coordinate pairs.
public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)
Public Sub DrawLine(pen As Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single)
| Type | Name | Description |
|---|---|---|
| Pen | pen | Pen object that determines the color, width, and style of the line. |
| float | x1 | x-coordinate of the first point. |
| float | y1 | y-coordinate of the first point. |
| float | x2 | x-coordinate of the second point. |
| float | y2 | y-coordinate of the second point. |
All coordinates are expressed in points, measured from the upper-left corner of the page.
Draws a line connecting two point structures.
public void DrawLine(Pen pen, PointF pt1, PointF pt2)
Public Sub DrawLine(pen As Pen, pt1 As PointF, pt2 As PointF)
| Type | Name | Description |
|---|---|---|
| Pen | pen | Pen object that determines the color, width, and style of the line. |
| PointF | pt1 | The first point. |
| PointF | pt2 | The second point. |
All coordinates are expressed in points, measured from the upper-left corner of the page.