Difference between revisions of "love.graphics.quad"

m (Added Other Languages section.)
m (Remove superfluous full stop.)
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Draws a quad.
+
{{oldin|[[0.9.0]]|090|type=function|text=This function is not supported in that and later versions. Use [[love.graphics.polygon]] instead}}
 +
Draws a quadrilateral shape.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
Line 18: Line 19:
 
Nothing.
 
Nothing.
 
== Examples ==
 
== Examples ==
=== An amazing circle. ===
+
=== A quadrilateral that has its top left corner located at 0,0 and whose width and height are 100 pixels. ===
 
<source lang="lua">
 
<source lang="lua">
 
function love.draw()
 
function love.draw()
Line 27: Line 28:
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Draws a quad.}}
+
[[Sub-Category::Drawing| ]]
 +
{{#set:Description=Draws a quadrilateral shape.}}
 +
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.quad}}
 
{{i18n|love.graphics.quad}}

Latest revision as of 13:34, 5 November 2014

Removed in LÖVE 0.9.0
This function is not supported in that and later versions. Use love.graphics.polygon instead.

Draws a quadrilateral shape.

Function

Synopsis

love.graphics.quad( mode, x1, y1, x2, y2, x3, y3, x4, y4 )

Arguments

DrawMode mode
How to draw the quad.
number x1
The position of the top left corner along x-axis.
number y1
The position of the top left corner along y-axis.
number x2
The position of the top right corner along x-axis.
number y2
The position of the top right corner along y-axis.
number x3
The position of the bottom right corner along x-axis.
number y3
The position of the bottom right corner along y-axis.
number x4
The position of the bottom left corner along x-axis.
number y4
The position of the bottom left corner along y-axis.

Returns

Nothing.

Examples

A quadrilateral that has its top left corner located at 0,0 and whose width and height are 100 pixels.

function love.draw()
	love.graphics.quad("fill", 0, 0, 100, 0, 100, 100, 0, 100)
end

See Also


Other Languages