From f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 24 Jan 2021 18:44:56 +0100 Subject: Initial commit --- .../Classes/Clipper/Methods/Constructor.htm | 95 +++++++++++++ .../ClipperLib/Classes/Clipper/Methods/Execute.htm | 91 +++++++++++++ .../Clipper/Properties/PreserveCollinear.htm | 74 ++++++++++ .../Classes/Clipper/Properties/ReverseSolution.htm | 76 +++++++++++ .../Classes/Clipper/Properties/StrictlySimple.htm | 88 ++++++++++++ .../Classes/Clipper/Properties/ZFillFunction.htm | 75 +++++++++++ .../Units/ClipperLib/Classes/Clipper/_Body.htm | 149 +++++++++++++++++++++ 7 files changed, 648 insertions(+) create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Constructor.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Execute.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/PreserveCollinear.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ReverseSolution.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/StrictlySimple.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ZFillFunction.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/_Body.htm (limited to 'upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper') diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Constructor.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Constructor.htm new file mode 100644 index 0000000..f51279f --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Constructor.htm @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + Constructor + + + + + + + + + + + + + + + + + + + + + + +

Clipper.Constructor

+ + +

Del.» constructor TClipper.Create(InitOptions: TInitOptions = []);

+ +

C++ » Clipper::Clipper(int initOptions = 0) : ClipperBase();

+ +

C#  » public Clipper(initOptions = 0): base() {};

+ +

The Clipper constructor creates an instance of the Clipper class. One or more InitOptions may be passed as a parameter to set the corresponding properties. (These properties can still be set or reset after construction.)

Examples:

+ + + + + + +
+ +
+  //C++ constructor setting StrictlySimple and PreserveCollinear properties ...
+  Clipper clipper(ioStrictlySimple | ioPreserveCollinear);
+
+  //C# constructor setting StrictlySimple and PreserveCollinear properties ...
+  Clipper clipper = new Clipper(Clipper.ioStrictlySimple | Clipper.ioPreserveCollinear);
+
+  //Delphi constructor setting StrictlySimple and PreserveCollinear properties ...
+  clipper := TClipper.Create([ioStrictlySimple, ioPreserveCollinear]);
+          
+ +

 

+ + + + + +

See Also

+

PreserveCollinear, ReverseSolution, StrictlySimple, InitOptions

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Execute.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Execute.htm new file mode 100644 index 0000000..b551a19 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Methods/Execute.htm @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + Execute + + + + + + + + + + + + + + + + + + + + + + +

Clipper.Execute

+ + +

Del.»
function Execute(clipType: TClipType;
  out solution: TPaths;
  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,
  Paths &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,
  Paths solution,
  PolyFillType subjFillType,
  PolyFillType clipFillType);

public bool Execute(ClipType clipType,
  PolyTree solution,
  PolyFillType subjFillType,
  PolyFillType clipFillType);

+ +
+ +

Once subject and clip paths have been assigned (via AddPath and/or AddPaths), Execute can then perform the clipping operation (intersection, union, difference or XOR) specified by the clipType parameter.

The solution parameter can be either a Paths or PolyTree structure. The Paths structure is simpler than the PolyTree stucture. Because of this it is quicker to populate and hence clipping performance is a little better (it's roughly 10% faster). However, the PolyTree data structure provides more information about the returned paths which may be important to users. Firstly, the PolyTree structure preserves nested parent-child polygon relationships (ie outer polygons owning/containing holes and holes owning/containing other outer polygons etc). Also, only the PolyTree structure can differentiate between open and closed paths since each PolyNode has an IsOpen property. (The Path structure has no member indicating whether it's open or closed.) For this reason, when open paths are passed to a Clipper object, the user must use a PolyTree object as the solution parameter, otherwise an exception will be raised.

When a PolyTree object is used in a clipping operation on open paths, two ancilliary functions have been provided to quickly separate out open and closed paths from the solution - OpenPathsFromPolyTree and ClosedPathsFromPolyTree. PolyTreeToPaths is also available to convert path data to a Paths structure (irrespective of whether they're open or closed).

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


+ + +

The subjFillType and clipFillType parameters define the polygon fill rule to be applied to the polygons (ie closed paths) in the subject and clip paths respectively. (It's usual though obviously not essential that both sets of polygons use the same fill rule.)

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, Rounding, ClipperBase.AddPath, ClipperBase.AddPaths, PolyNode.IsOpen, PolyTree, ClosedPathsFromPolyTree, OpenPathsFromPolyTree, PolyTreeToPaths, ClipType, Path, Paths, PolyFillType

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/PreserveCollinear.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/PreserveCollinear.htm new file mode 100644 index 0000000..c198c67 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/PreserveCollinear.htm @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + PreserveCollinear + + + + + + + + + + + + + + + + + + + + + + +

Clipper.PreserveCollinear

+ + +

Del.» property PreserveCollinear: boolean; override;

+ +

C++ » void PreserveCollinear(bool value);

+ +

C#  » public bool PreserveCollinear { get {} set {} };

+ + +


By default, when three or more vertices are collinear in input polygons (subject or clip), the Clipper object removes the 'inner' vertices before clipping. When enabled the PreserveCollinear property prevents this default behavior to allow these inner vertices to appear in the solution.

+ + + +

See Also

+

Constructor

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ReverseSolution.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ReverseSolution.htm new file mode 100644 index 0000000..4294395 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ReverseSolution.htm @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + ReverseSolution + + + + + + + + + + + + + + + + + + + + + + +

Clipper.ReverseSolution

+ + +

Del.» property ReverseSolution: boolean; override;

+ +

C++ » void ReverseSolution(bool value);

+ +

C#  » public bool ReverseSolution { get {} set {} };

+ + +

When this property is set to true, polygons returned in the solution parameter of the Execute() method will have orientations opposite to their normal orientations.

+ + + + + +

See Also

+

Execute, Orientation

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/StrictlySimple.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/StrictlySimple.htm new file mode 100644 index 0000000..b6918cc --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/StrictlySimple.htm @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + StrictlySimple + + + + + + + + + + + + + + + + + + + + + + +

Clipper.StrictlySimple

+ + +

Del.» property StrictlySimple: boolean; override;

+ +

C++ » void StrictlySimple(bool value);

+ +

C#  » public bool StrictlySimple { get {} set {} };

+ + +


Terminology:
+

+ +

Vertices 'touch' if they share the same coordinates (and are not adjacent). An edge touches another if one of its end vertices touches another edge excluding its adjacent edges, or if they are co-linear and overlapping (including adjacent edges).

Polygons returned by clipping operations (see Clipper.Execute()) should always be simple polygons. When the StrictlySimply property is enabled, polygons returned will be strictly simple, otherwise they may be weakly simple. It's computationally expensive ensuring polygons are strictly simple and so this property is disabled by default.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.


+ + +

In the image above, the two examples show weakly simple polygons being broken into two strictly simple polygons. (The outlines with arrows are intended to aid visualizing vertex order.)

See also the article on Simple Polygons on Wikipedia.

+ + + +

See Also

+

Execute, SimplifyPolygons

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ZFillFunction.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ZFillFunction.htm new file mode 100644 index 0000000..290061e --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/ZFillFunction.htm @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + ZFillFunction + + + + + + + + + + + + + + + + + + + + + + +

Clipper.ZFillFunction

+ + +

Del.» property ZFillFunction: TZFillCallback read FZFillCallback write FZFillCallback;

+ +

C++ » void ZFillFunction(ZFillCallback zFillFunc);

+ +

C#  » public ZFillCallback ZFillFunction { get; set; };

+
+ +

This property is only exposed when the pre-processor directive use_xyz has been defined. If this is the case, a 'Z' member will be included in the IntPoint structure where users can store custom data. While most vertices in a clipping solution will correspond to input (subject and clip) vertices, there will also be new vertices wherever edges intersect. This property assigns a custom callback function to the Clipper object so that custom 'Z' values can be assigned to these intersection vertices. (Note that 'Z' values in the solution at non-intersecting vertices will simply be copied from matching input vertices along with the X and Y values.)

It is up to the library user to assign 'Z' values for new intersection vertices (otherwise these values will remain 0). The four vertices that define the intersecting line segments will be passed to the callback function (together with the new intersection vertex) to aid the user in determining appropriate Z values.

+

+ + +

See Also

+

Defines, IntPoint, ZFillCallback

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/_Body.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/_Body.htm new file mode 100644 index 0000000..330ecf1 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/Clipper/_Body.htm @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + Clipper + + + + + + + + + + + + + + + + + + + + + + + +

Clipper

+

Hierarchy

+

+

   |

+

ClipperBase

+
+ +

The Clipper class encapsulates boolean operations on polygons (intersection, union, difference and XOR), which is also called polygon clipping.

Input polygons, both subject and clip sets, are passed to a Clipper object by its AddPath and AddPaths methods, and the clipping operation is performed by calling its Execute method. Multiple boolean operations can be performed on the same input polygon sets by repeat calls to Execute.

+ +

Reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Fields + Methods + Properties +
In Clipper: +
+ Constructor + PreserveCollinear +
+ Execute + ReverseSolution +
+ + StrictlySimple +
+ + ZFillFunction +
In ClipperBase: +
+ AddPath + +
+ AddPaths + +
+ Clear + +
+ GetBounds + +
+

See Also

+

Overview, ClipType

+ + + + + + \ No newline at end of file -- cgit