Polygon:getPoints

From GiderosMobile
Revision as of 18:08, 14 November 2026 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2015.03.22<br/> '''Class:''' Clipper<br/> === Description === Returns all vertices of the polygon as a Lua table. <syntaxhighligh...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2015.03.22
Class: Clipper

Description

Returns all vertices of the polygon as a Lua table.

(table) = Polygon:getPoints()

Return values

Returns (table) array of points, each point is a table { 1 = x, 2 = y }, indexed from 1

Example

local pts = poly:getPoints()
for i = 1, #pts do
	print(pts[i][1], pts[i][2])
end