ClipperD.Execute

Delphifunction Execute(clipType: TClipType; fillRule: TFillRule): boolean; out solution: TPathsD;

 function Execute(clipType: TClipType; fillRule: TFillRule): boolean;
    out solution: TPathsD; out openSolution: TPathsD;

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

 function Execute(clipType: TClipType; fillRule: TFillRule): boolean;
    var solution: TPolyTreeD; out openSolution: TPathsD;


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

bool Execute(Clip_type clipType, FillRule fill_rule,
    PathsD& solution, PathsD& open_solution);

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

bool Execute(Clip_type clipType, FillRule fill_rule,
    PolyTreeD& solution, PathsD& open_solution);


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

public bool Execute(ClipType clipType, FillRule fillRule,
    PathsD solution, PathsD openSolution);

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

public bool Execute(ClipType clipType, FillRule fillRule,
    PolyTreeD solution, PathsD openSolution);


Once subject and clip paths have been assigned (see 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 PathsD or a PolyTreeD, though since the PathsD 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 PolyTreeD and PolyTree64 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:


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).

See Also

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