Clipper:getIntersection: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2015.03.22<br/> '''Class:''' Clipper<br/> === Description === Computes the intersection of the subject and clip polygons. <syntax..."
 
No edit summary
 
Line 6: Line 6:
Computes the intersection of the subject and clip polygons.
Computes the intersection of the subject and clip polygons.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
(table) = Clipper:getIntersection(fillType1, fillType2)
(table) = Clipper:getIntersection(fillType1,fillType2)
</syntaxhighlight>
</syntaxhighlight>



Latest revision as of 22:00, 14 November 2026

Available since: Gideros 2015.03.22
Class: Clipper

Description

Computes the intersection of the subject and clip polygons.

(table) = Clipper:getIntersection(fillType1,fillType2)

Parameters

fillType1: (number, optional, default = Polygon.FILL_EVEN_ODD) fill rule for the subject polygons
fillType2: (number, optional, default = Polygon.FILL_EVEN_ODD) fill rule for the clip polygons

Return values

Returns (table) array of Polygon objects (1 indexed) with the resulting polygons. May be empty when there is no overlap

Example

local res = clipper:getIntersection(Polygon.FILL_EVEN_ODD, Polygon.FILL_EVEN_ODD)