Home | ClipperLib | Clipper |

# Clipper.Execute

Del.»
function Execute(clipType: TClipType;
out solution: TPolygons;
subjFillType: TPolyFillType = pftEvenOdd;
clipFillType: TPolyFillType = pftEvenOdd): boolean; overload;
function Execute(clipType: TClipType;
out solution: TPolyTree;
subjFillType: TPolyFillType = pftEvenOdd;
clipFillType: TPolyFillType = pftEvenOdd): boolean; overload;

C++ »
bool Execute(ClipType clipType,
Polygons &solution,
PolyFillType subjFillType = pftEvenOdd,
PolyFillType clipFillType = pftEvenOdd);
bool Execute(ClipType clipType,
PolyTree &solution,
PolyFillType subjFillType = pftEvenOdd,
PolyFillType clipFillType = pftEvenOdd);

C# »
public bool Execute(ClipType clipType,
Polygons solution,
PolyFillType subjFillType,
PolyFillType clipFillType);
public bool Execute(ClipType clipType,
PolyTree solution,
PolyFillType subjFillType,
PolyFillType clipFillType);

Once subject and clip polygons have been assigned (via AddPolygon and/or AddPolygons), Execute can then perform the clipping operation (intersection, union, difference or XOR) specified by the clipType parameter. This operation is performed on both subject and clip polygon sets using their respective fill types. (Subject and clip polygons usually use the same fill type.)
The solution parameter can be either a Polygons or PolyTree structure. While polygons returned in the solution won't be in any specific order, they will never overlap or be self-intersecting. Since holes will be oriented opposite outer polygons, the solution fill type can be either EvenOdd or NonZero.
Execute can be called multiple times without reassigning subject and clip polygons (ie when different clipping operations are required on the same polygon sets).

## See Also

Example, ClipperBase.AddPolygon, ClipperBase.AddPolygons, PolyTree, ClipType, PolyFillType, Polygons

Copyright ©2010-2013 Angus Johnson - Clipper version 5.1.5 - Help file built on 6-May-2013