Draws lines between points.
== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.line( x1, y1, x2, y2, ... )
</source>
=== 引数 ===
{{param (日本語)|number|x1|The position of first point on the x-axis.}}
{{param (日本語)|number|y1|The position of first point on the y-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|...|You can continue passing point positions to draw a polyline.}}
=== 返値 ===
ありません。
== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.line( points )
</source>
=== 引数 ===
{{param (日本語)|table|points|A table of point positions, as described above.}}
=== 返値 ===
ありません。
== 用例 ==
Draw the outline of a simple trapezoid.
<source lang="lua">
function love.draw()
   love.graphics.line(200,50, 400,50, 500,300, 100,300, 200,50)   -- last pair is a repeat to complete the trapezoid
end
</source>
Draw a line from the center of the screen to the mouse pointer.
<source lang="lua">
w = love.graphics.getWidth() / 2   -- half the window width
h = love.graphics.getHeight() / 2   -- half the window height
function love.draw()
   local mx, my = love.mouse.getPosition()  -- current position of the mouse
   love.graphics.line(w, h, mx, my)
end
</source>
Draw a zigzag line from a single table.
<source lang="lua">
sometable = {
   100, 100,
   200, 200,
   300, 100,
   400, 200,
}
function love.draw()
   love.graphics.line(sometable)
end
</source>
== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[love.graphics.setLine (日本語)]]
* [[love.graphics.setLineWidth (日本語)]]
* [[love.graphics.setLineStyle (日本語)]]
[[Category:Functions (日本語)]]
[[Sub-Category::Drawing (日本語)| ]]
{{#set:Description=Draws lines between points.}}
{{#set:Since=000}}
== そのほかの言語 ==
{{i18n (日本語)|love.graphics.line}}