Difference between revisions of "love.graphics.line"

m (1 revision: Importing from potato (again).)
(added polyline info)
Line 1: Line 1:
 
+
Draws lines between points.
Draws a line between two points.
 
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
love.graphics.line( x1, y1, x2, y2 )
+
love.graphics.line( x1, y1, x2, y2, ... )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
Line 11: Line 10:
 
{{param|number|x2|The position of second point on the x-axis.}}
 
{{param|number|x2|The position of second point on the x-axis.}}
 
{{param|number|y2|The position of second point on the y-axis.}}
 
{{param|number|y2|The position of second point on the y-axis.}}
 +
{{param|number|...|You can continue passing point positions to draw a polyline.}}
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
 +
== Function ==
 +
=== Synopsis ===
 +
<source lang="lua">
 +
love.graphics.line( points )
 +
</source>
 +
=== Arguments ===
 +
{{param|table|points|A table of point positions, as described above.}}
 +
=== Returns ===
 +
Nothing.
 +
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Draws a line between two points.}}
+
{{#set:Description=Draws lines between points.}}

Revision as of 15:00, 23 February 2010

Draws lines between points.

Function

Synopsis

love.graphics.line( x1, y1, x2, y2, ... )

Arguments

number x1
The position of first point on the x-axis.
number y1
The position of first point on the y-axis.
number x2
The position of second point on the x-axis.
number y2
The position of second point on the y-axis.
number ...
You can continue passing point positions to draw a polyline.

Returns

Nothing.

Function

Synopsis

love.graphics.line( points )

Arguments

table points
A table of point positions, as described above.

Returns

Nothing.

See Also