love.graphics:drawLine( xpos, ypos, x1, y1, x2, y2, width )
The xpos and ypos coordinates denote the absolute position of the shape on the screen whereas the (x1,y1) and (x2,y2) coordinates are relative to that position.
Usage
love.graphics:drawLine( xpos, ypos, x1, y1, x2, y2, width )Arguments
xposThe position on the x-axis.
yposThe position on the y-axis.
x1The first relative x-coordinate.
y1The first relative y-coordinate.
x2The second relative x-coordinate.
y2The second relative y-coordinate.
widthThe width of the drawn line (minimum: 1).
Returns
Nothing
Examples
Example 1: Draws a thick horizontal line.
love.graphics:drawLine(100, 100, -50, 0, 50, 0, 5); -- very thickExample 2: Draws a slightly thick diagonal line. love.graphics:drawLine(100, 100, -50, -50, 50, 50, 2); -- slightly thick