Delphi**function** Execute(clipType: TClipType; fillRule: TFillRule): boolean; **out** solution: TPaths64;

**function** Execute(clipType: TClipType; fillRule: TFillRule): boolean;

**out** solution: TPaths64; **out** openSolution: TPaths64;

**function** Execute(clipType: TClipType; fillRule: TFillRule): boolean; **var** solution: TPolyTree64;

**function** Execute(clipType: TClipType; fillRule: TFillRule): boolean;

**var** solution: TPolyTree64; **out** openSolution: TPaths64;

C++**bool** Execute(ClipType clip_type, FillRule fill_rule, Paths64& solution);

**bool** Execute(Clip_type clipType, FillRule fill_rule,

Paths64& solution, Paths64& open_solution);

**bool** Execute(Clip_type clipType, FillRule fill_rule, PolyTree64& solution);

**bool** Execute(Clip_type clipType, FillRule fill_rule,

PolyTree64& solution, Paths64& open_solution);

C# **public bool** Execute(ClipType clipType, FillRule fillRule, Paths64 solution);

**public bool** Execute(ClipType clipType, FillRule fillRule,

Paths64 solution, Paths64 openSolution);

**public bool** Execute(ClipType clipType, FillRule fillRule, PolyTree64 solution);

**public bool** Execute(ClipType clipType, FillRule fillRule,

PolyTree64 solution, Paths64 openSolution);

Once *subject* and *clip* paths have been assigned (via **AddSubject**, **AddOpenSubject** and **AddClip** methods), **Execute** can then perform the specified clipping operation (intersection, union, difference or XOR).

The **solution** parameter can be either a Paths64 or a PolyTree64, though since the Paths64 structure is simpler and more easily populated (with clipping about 5% faster), it should generally be preferred.

While polygons in solutions should never intersect (either with other polygons or with themselves), they will frequently be nested such that outer polygons will contain inner 'hole' polygons with in turn may contain outer polygons (to any level of nesting). And given that **PolyTree64** and **PolyTreeD** preserve these parent-child relationships, these two PolyTree classes will be very useful to some users.

There are several things to note about the solution paths returned:

- PolyTrees are structured such that outside polygons will always be at the top most level (ie childs of polytree)
- polygons in Paths64 on the other hand won't appear any particular order, though polygons with larger Y coordinates tend to be listed first.
- polygon 'holes' will always wind in a negative direction (in both Paths64 and in PolyTree64)
- the solution's
**fill rule**is undefined since it's consistent with any fill type**except***Negative* - polygons may still on occasions share common ('touching') edges
- polygons should never overlap or be self-intersecting (however, see notes on
**rounding**)

The **FillRule** parameter identifies the filling rule that's to be applied to all input polygons.

**Execute** can also be called multiple times without reassigning subject and clip polygons (ie when different clipping operations are required on the same polygon sets).

Examples, Rounding, AddClip, AddOpenSubject, AddSubject, PolyTree64, PolyTreeD, ClipType, FillRule, Paths64

Copyright © 2010-2023 Angus Johnson - Clipper2 1.2.2 - Help file built on 26 Mar 2023