Polygon.new: Difference between revisions
From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2015.03.22<br/> '''Class:''' Clipper<br/> === Description === Creates a new clipping engine. <syntaxhighlight lang="lua"> (Clippe..." |
No edit summary |
||
| Line 4: | Line 4: | ||
=== Description === | === Description === | ||
Creates | Creates an empty polygon. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
( | (Polygon) = Polygon.new() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Return values === | |||
'''Returns''' (Polygon) the new polygon<br/> | |||
=== | === Example === | ||
<syntaxhighlight lang="lua"> | |||
local poly = Polygon.new() | |||
poly:addPoint(0, 0) | |||
poly:addPoint(100, 0) | |||
poly:addPoint(100, 100) | |||
poly:addPoint(0, 100) | |||
</syntaxhighlight> | |||
{{Clipper}} | {{Clipper}} | ||
Latest revision as of 03:44, 14 November 2026
Available since: Gideros 2015.03.22
Class: Clipper
Description
Creates an empty polygon.
(Polygon) = Polygon.new()
Return values
Returns (Polygon) the new polygon
Example
local poly = Polygon.new()
poly:addPoint(0, 0)
poly:addPoint(100, 0)
poly:addPoint(100, 100)
poly:addPoint(0, 100)