Method DrawLine
DrawLine(int, int, int, int)
Draws a line from the given start position up to, but not including, the specified end point.
public virtual void DrawLine(int x1, int y1, int x2, int y2)
Parameters
x1
intX-coordinate of the line's start point.
y1
intY-coordinate of the line's start point.
x2
intX-coordinate of the line's ending point.
y2
intY-coordinate of the line's ending point.
DrawLine(int, int, int, int, Color, int, DashStyle)
Draws a line from the given start position up to, but not including, the specified end point.
public virtual void DrawLine(int x1, int y1, int x2, int y2, Color color, int width, DashStyle penStyle)
Parameters
x1
intX-coordinate of the line's start point.
y1
intY-coordinate of the line's start point.
x2
intX-coordinate of the line's ending point.
y2
intY-coordinate of the line's ending point.
color
ColorSpecifies color of the Pen object to draw line.
width
intSpecifies width of the Pen object to draw line.
penStyle
DashStyleSpecifies style of the Pen object to draw line.