Difference between revisions of "PolygonShape:getPoints"

m (included link to other languages)
(fixed getPoints)
Line 23: Line 23:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Get the world coordinates of the polygon's vertices.}}
 
{{#set:Description=Get the world coordinates of the polygon's vertices.}}
 +
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|PolygonShape:getPoints}}
 
{{i18n|PolygonShape:getPoints}}

Revision as of 22:36, 17 May 2011

Get the world coordinates of the polygon's vertices.

This function has a variable number of return values. It can be used in a nested fashion with love.graphics.polygon.

Function

Synopsis

x1, y1, x2, y2, x3, y3, ... = PolygonShape:getPoints( )

Arguments

None.

Returns

number x1
The x-component of the first vertex.
number y1
The y-component of the first vertex.
number x2
The x-component of the second vertex.
number y2
The y-component of the second vertex.
number x3
The x-component of the third vertex.
number y3
The y-component of the third vertex.

The dots indicate that the function may have up to 16 return values, since it returns two values for each vertex in the polygon.

See Also


Other Languages