Skip to content

drawLine

stevepaget edited this page Feb 16, 2016 · 1 revision

Draws a straight line


Syntax:

drawLine(x1, y1, x2, y2, colour, lineWidth)

Where:

x1, y1 are integers representing the x and y coordinates of one end of the line.
x2, y2 are integers representing the x and y coordinates of the other end of the line.
colour is a wghs colour value. (See Colours)
lineWidth is an integer representing the line width in pixels. (Optional. Default is 1)

Note: Pygame does not handle very thick lines very well.

Clone this wiki locally