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 ++++++++++++++++ .../Classes/ClipperBase/Methods/AddPath.htm | 95 +++++++++++ .../Classes/ClipperBase/Methods/AddPaths.htm | 93 ++++++++++ .../Classes/ClipperBase/Methods/Clear.htm | 71 ++++++++ .../Classes/ClipperBase/Methods/GetBounds.htm | 76 +++++++++ .../Units/ClipperLib/Classes/ClipperBase/_Body.htm | 91 ++++++++++ .../Classes/ClipperOffset/Methods/AddPath.htm | 73 ++++++++ .../Classes/ClipperOffset/Methods/AddPaths.htm | 74 ++++++++ .../Classes/ClipperOffset/Methods/Clear.htm | 72 ++++++++ .../Classes/ClipperOffset/Methods/Constructor.htm | 74 ++++++++ .../Classes/ClipperOffset/Methods/Execute.htm | 111 ++++++++++++ .../ClipperOffset/Properties/ArcTolerance.htm | 74 ++++++++ .../ClipperOffset/Properties/MiterLimit.htm | 75 ++++++++ .../ClipperLib/Classes/ClipperOffset/_Body.htm | 136 +++++++++++++++ .../Classes/PolyNode/Methods/GetNext.htm | 97 +++++++++++ .../Classes/PolyNode/Properties/ChildCount.htm | 74 ++++++++ .../Classes/PolyNode/Properties/Childs.htm | 75 ++++++++ .../Classes/PolyNode/Properties/Contour.htm | 69 ++++++++ .../Classes/PolyNode/Properties/IsHole.htm | 72 ++++++++ .../Classes/PolyNode/Properties/IsOpen.htm | 72 ++++++++ .../Classes/PolyNode/Properties/Parent.htm | 69 ++++++++ .../Units/ClipperLib/Classes/PolyNode/_Body.htm | 125 ++++++++++++++ .../ClipperLib/Classes/PolyTree/Methods/Clear.htm | 73 ++++++++ .../Classes/PolyTree/Methods/GetFirst.htm | 77 +++++++++ .../Classes/PolyTree/Properties/Total.htm | 74 ++++++++ .../Units/ClipperLib/Classes/PolyTree/_Body.htm | 189 +++++++++++++++++++++ 32 files changed, 2829 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 create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/Methods/AddPath.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/Methods/AddPaths.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/Methods/Clear.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/Methods/GetBounds.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/_Body.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/Methods/AddPath.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/Methods/AddPaths.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/Methods/Clear.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/Methods/Constructor.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/Methods/Execute.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/Properties/ArcTolerance.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/Properties/MiterLimit.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/_Body.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Methods/GetNext.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Properties/ChildCount.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Properties/Childs.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Properties/Contour.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Properties/IsHole.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Properties/IsOpen.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Properties/Parent.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/_Body.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyTree/Methods/Clear.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyTree/Methods/GetFirst.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyTree/Properties/Total.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyTree/_Body.htm (limited to 'upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes') 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 diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/Methods/AddPath.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/Methods/AddPath.htm new file mode 100644 index 0000000..de8c944 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperBase/Methods/AddPath.htm @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + AddPath + + + + + + + + + + + + + + + + + + + + + + +

ClipperBase.AddPath

+ + +

Del.» function AddPath(const path: TPath; polyType: TPolyType; Closed: Boolean): Boolean;

+ +

C++ » bool AddPath(const Path &pg, PolyType polyType, bool closed);

+ +

C#  » public virtual bool AddPath(Path pg, PolyType polyType, bool closed);

+
+ + +

Any number of subject and clip paths can be added to a clipping task, either individually via the AddPath() method, or as groups via the AddPaths() method, or even using both methods.

'Subject' paths may be either open (lines) or closed (polygons) or even a mixture of both, but 'clipping' paths must always be closed. Clipper allows polygons to clip both lines and other polygons, but doesn't allow lines to clip either lines or polygons.

With closed paths, orientation should conform with the filling rule that will be passed via Clippper's Execute method.

+ + + +

Path Coordinate range:
Path coordinates must be between ± 0x3FFFFFFFFFFFFFFF (± 4.6e+18), otherwise a range error will be thrown when attempting to add the path to the Clipper object. If coordinates can be kept between ± 0x3FFFFFFF (± 1.0e+9), a modest increase in performance (approx. 15-20%) over the larger range can be achieved by avoiding large integer math. If the preprocessor directive use_int32 is defined (allowing a further increase in performance of 20-30%), then the maximum range is restricted to ± 32,767.

+ + +

Return Value:
The function will return false if the path is invalid for clipping. A path is invalid for clipping when: +

+ +
+ + + + +

See Also

+

Example, Clipper.Execute, AddPaths, Orientation, Defines, Path, PolyFillType, PolyType

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

ClipperBase.AddPaths

+ + +

Del.» function AddPaths(const paths: TPaths; polyType: TPolyType; Closed: Boolean): boolean;

+ +

C++ » bool AddPaths(const Paths &ppg, PolyType polyType, bool closed);

+ +

C#  » public virtual bool AddPaths(Paths ppg, PolyType polyType, bool closed);

+
+ +

Any number of subject and clip paths can be added to a clipping task, either individually via the AddPath() method, or as groups via the AddPaths() method, or even using both methods.

'Subject' paths may be either open (lines) or closed (polygons) or even a mixture of both, but 'clipping' paths must always be closed. Clipper allows polygons to clip both lines and other polygons, but doesn't allow lines to clip either lines or polygons.

With closed paths, orientation should conform with the filling rule that will be passed via Clippper's Execute method.

+ + + +

Path Coordinate range:
Path coordinates must be between ± 0x3FFFFFFFFFFFFFFF (± 4.6e+18), otherwise a range error will be thrown when attempting to add the path to the Clipper object. If coordinates can be kept between ± 0x3FFFFFFF (± 1.0e+9), a modest increase in performance (approx. 15-20%) over the larger range can be achieved by avoiding large integer math. If the preprocessor directive use_int32 is defined (allowing a further increase in performance of 20-30%), then the maximum range is restricted to ± 32,767.

+ + +

Return Value:
The function will return false if the path is invalid for clipping. A path is invalid for clipping when: +

+ +
+ + + + +

See Also

+

Example, Clipper.Execute, AddPaths, Orientation, Defines, Paths, PolyFillType, PolyType

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

ClipperBase.Clear

+ + +

Del.» procedure Clear;

+ +

C++ » virtual void Clear();

+ +

C#  » public void Clear() {};

+ +

The Clear method removes any existing subject and clip polygons allowing the Clipper object to be reused for clipping operations on different polygon sets.

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

ClipperBase.GetBounds

+ + +

Del.» function GetBounds: TIntRect;

+ +

C++ » IntRect GetBounds();

+ +

C#  » public IntRect GetBounds() {...};

+
+ +

This method returns the axis-aligned bounding rectangle of all polygons that have been added to the Clipper object.

+ +
+ + + +

See Also

+

Example, IntRect

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

ClipperBase

+ +

ClipperBase is an abstract base class for Clipper. A ClipperBase object should not be instantiated directly.

+ + +

Reference

+ + + + + + + + + + + + + + + + + + +
Methods +
In ClipperBase: +
AddPath +
AddPaths +
Clear +
GetBounds +
+

See Also

+

Clipper

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

ClipperOffset.AddPath

+ + +

Del.» procedure AddPath(const Path: TPath; JoinType: TJoinType; EndType: TEndType);

+ +

C++ » void AddPath(const Path& path, JoinType jointype, EndType endtype);

+ +

C#  » public void AddPath(Path path, JoinType jointype, EndType endtype);

+
+ + +

Adds a Path to a ClipperOffset object in preparation for offsetting.

Any number of paths can be added, and each has its own JoinType and EndType. All 'outer' Paths must have the same orientation, and any 'hole' paths must have reverse orientation. Closed paths must have at least 3 vertices. Open paths may have as few as one vertex. Open paths can only be offset with positive deltas.

+ +

See Also

+

EndType, JoinType, Path

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

ClipperOffset.AddPaths

+ + +

Del.» procedure AddPaths(const Paths: TPaths; JoinType: TJoinType; EndType: TEndType);

+ +

C++ » void AddPaths(const Paths& paths, JoinType jointype, EndType endtype);

+ +

C#  » public void AddPaths(Paths paths, JoinType jointype, EndType endtype);

+
+ + +

Adds Paths to a ClipperOffset object in preparation for offsetting.

Any number of paths can be added, and each path has its own JoinType and EndType. All 'outer' Paths must have the same orientation, and any 'hole' paths must have reverse orientation. Closed paths must have at least 3 vertices. Open paths may have as few as one vertex. Open paths can only be offset with positive deltas.

+ + +

See Also

+

EndType, JoinType, Paths

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

ClipperOffset.Clear

+ + +

Del.» procedure Clear;

+ +

C++ » void Clear();

+ +

C#  » public void Clear();

+
+ + +

This method clears all paths from the ClipperOffset object, allowing new paths to be assigned.

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

ClipperOffset.Constructor

+ + +

Del.» constructor Create(MiterLimit: Double = 2; RoundPrecision: Double = 0.25);

+ +

C++ » ClipperOffset( double miterLimit = 2.0, double roundPrecision = 0.25);

+ +

C#  » public ClipperOffset( double miterLimit = 2.0, double roundPrecision = 0.25);

+
+ + +

The ClipperOffset constructor takes 2 optional parameters: MiterLimit and ArcTolerance. Thes two parameters corresponds to properties of the same name. MiterLimit is only relevant when JoinType is jtMiter, and ArcTolerance is only relevant when JoinType is jtRound or when EndType is etOpenRound.

+ + +

See Also

+

ArcTolerance, MiterLimit

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

ClipperOffset.Execute

+ + +

Del.» procedure Execute(out solution: TPaths; Delta: Double); overload;

+ +

C++ » void Execute(Paths& solution, double delta);

+ +

C#  » public void Execute(ref Paths solution, double delta);

+
+ +

Del.» procedure Execute(out PolyTree: TPolyTree; Delta: Double); overload;

+ +

C++ » void Execute(PolyTree& polytree, double delta);

+ +

C#  » public void Execute(ref PolyTree polytree, double delta);

+
+ + +

This method takes two parameters. The first is the structure that receives the result of the offset operation (either a PolyTree or a Paths structure). The second parameter is the amount to which the supplied paths will be offset. Negative delta values shrink polygons and positive delta expand them.

This method can be called multiple times, offsetting the same paths by different amounts (ie using different deltas).

+ + + + + + +
+ +
+#include "clipper.hpp"  
+...
+using namespace ClipperLib;
+
+int main()
+{
+  Path subj;
+  Paths solution;
+  subj << 
+    IntPoint(348,257) << IntPoint(364,148) << IntPoint(362,148) << 
+    IntPoint(326,241) << IntPoint(295,219) << IntPoint(258,88) << 
+    IntPoint(440,129) << IntPoint(370,196) << IntPoint(372,275);
+  ClipperOffset co;
+  co.AddPath(subj, jtRound, etClosedPolygon);
+  co.Execute(solution, -7.0);
+  
+  //draw solution ...
+  DrawPolygons(solution, 0x4000FF00, 0xFF009900);
+}
+          
+ + +

 

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

ClipperOffset.ArcTolerance

+ +

Del.» property ArcTolerance: double; //read and write

+ +

C++ » double ArcTolerance;

+ +

C#  » public double ArcTolerance {get; set;}

+
+ +

Firstly, this field/property is only relevant when JoinType = jtRound and/or EndType = etRound.

Since flattened paths can never perfectly represent arcs, this field/property specifies a maximum acceptable imprecision ('tolerance') when arcs are approximated in an offsetting operation. Smaller values will increase 'smoothness' up to a point though at a cost of performance and in creating more vertices to construct the arc.

The default ArcTolerance is 0.25 units. This means that the maximum distance the flattened path will deviate from the 'true' arc will be no more than 0.25 units (before rounding).

Reducing tolerances below 0.25 will not improve smoothness since vertex coordinates will still be rounded to integer values. The only way to achieve sub-integer precision is through coordinate scaling before and after offsetting (see example below).

It's important to make ArcTolerance a sensible fraction of the offset delta (arc radius). Large tolerances relative to the offset delta will produce poor arc approximations but, just as importantly, very small tolerances will substantially slow offsetting performance while providing unnecessary degrees of precision. This is most likely to be an issue when offsetting polygons whose coordinates have been scaled to preserve floating point precision.

Example: Imagine a set of polygons (defined in floating point coordinates) that is to be offset by 10 units using round joins, and the solution is to retain floating point precision up to at least 6 decimal places.
To preserve this degree of floating point precision, and given that Clipper and ClipperOffset both operate on integer coordinates, the polygon coordinates will be scaled up by 108 + (and rounded to integers) prior to offsetting. Both offset delta and ArcTolerance will also need to be scaled by this same factor. If ArcTolerance was left unscaled at the default 0.25 units, every arc in the solution would contain a fraction of 44 THOUSAND vertices while the final arc imprecision would be 0.25 × 10-8 + units (ie once scaling was reversed). However, if 0.1 units was an acceptable imprecision in the final unscaled solution, then ArcTolerance should be set to 0.1 × scaling_factor (0.1 × 108 + ). Now if scaling is applied equally to both ArcTolerance and to Delta Offset, then in this example the number of vertices (steps) defining each arc would be a fraction of 23.

The formula for the number of steps in a full circular arc is ... Pi / acos(1 - arc_tolerance / abs(delta))

+ +

See Also

+

offset_triginometry2

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

ClipperOffset.MiterLimit

+ + +

Del.» property MiterLimit: double; //read and write

+ +

C++ » double MiterLimit;

+ +

C#  » public double MiterLimit {get; set;}

+
+ + +

This property sets the maximum distance in multiples of delta that vertices can be offset from their original positions before squaring is applied. (Squaring truncates a miter by 'cutting it off' at 1 × delta distance from the original vertex.)

The default value for MiterLimit is 2 (ie twice delta). This is also the smallest MiterLimit that's allowed. If mitering was unrestricted (ie without any squaring), then offsets at very acute angles would generate unacceptably long 'spikes'.

An example of an offsetting 'spike' at a narrow angle that's a consequence of using a large MiterLimit (25) ...

+ + + +

See Also

+

JoinType

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

ClipperOffset

+
+ +

The ClipperOffset class encapsulates the process of offsetting (inflating/deflating) both open and closed paths using a number of different join types and end types.

(This class replaces the now deprecated OffsetPaths function which was less flexible.)

Preconditions for offsetting:
1. The orientations of closed paths must be consistent such that outer polygons share the same orientation, and any holes have the opposite orientation (ie non-zero filling). Open paths must be oriented with closed outer polygons.
2. Polygons must not self-intersect.

Limitations:
When offsetting, small artefacts may appear where polygons overlap. To avoid these artefacts, offset overlapping polygons separately.


+ + + + + + +
+ +
+#include "clipper.hpp"  
+...
+using namespace ClipperLib;
+
+int main()
+{
+  Path subj;
+  Paths solution;
+  subj << 
+    IntPoint(348,257) << IntPoint(364,148) << IntPoint(362,148) << 
+    IntPoint(326,241) << IntPoint(295,219) << IntPoint(258,88) << 
+    IntPoint(440,129) << IntPoint(370,196) << IntPoint(372,275);
+  ClipperOffset co;
+  co.AddPath(subj, jtRound, etClosedPolygon);
+  co.Execute(solution, -7.0);
+  
+  //draw solution ...
+  DrawPolygons(solution, 0x4000FF00, 0xFF009900);
+}
+          
+ + +

 

+ +

Reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Methods + Properties +
In ClipperOffset: +
AddPath + ArcTolerance +
AddPaths + MiterLimit +
Clear + +
Constructor + +
Execute + +
+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Methods/GetNext.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Methods/GetNext.htm new file mode 100644 index 0000000..973c8bc --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/PolyNode/Methods/GetNext.htm @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + GetNext + + + + + + + + + + + + + + + + + + + + + + +

PolyNode.GetNext

+ + +

Del.» function GetNext: TPolyNode;

+ +

C++ » PolyNode* GetNext();

+ +

C#  » public PolyNode GetNext();

+ + +

The returned Polynode will be the first child if any, otherwise the next sibling, otherwise the next sibling of the Parent etc.

A PolyTree can be traversed very easily by calling GetFirst() followed by GetNext() in a loop until the returned object is a null pointer ...

+ + + + + + +
+ +
+  PolyTree polytree;
+  //call to Clipper.Execute method here which fills 'polytree'
+  
+  PolyNode* polynode = polytree.GetFirst();
+  while (polynode)
+  {
+    //do stuff with polynode here
+	
+    polynode = polynode->GetNext();
+  }
+  
+          
+ +

+ + + +

See Also

+

PolyTree.GetFirst

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

PolyNode.ChildCount

+ + +

Del.» property ChildCount: Integer; //read only

+ +

C++ » ChildCount(); //read only

+ +

C#  » public int ChildCount; //read only

+ +
+ +

Returns the number of PolyNode Childs directly owned by the PolyNode object.

+ + +

See Also

+

Childs

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

PolyNode.Childs

+ + +

Del.» property Childs[index: Integer]: TPolyNode; //read only

+ +

C++ » std::vector < PolyNode* > Childs;//public field

+ +

C#  » public List < PolyNode > Childs; //read only property

+ + +

A read-only list of PolyNode.
Outer PolyNode childs contain hole PolyNodes, and hole PolyNode childs contain nested outer PolyNodes.

+ + + + +

See Also

+

ChildCount

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

PolyNode.Contour

+ +

Del.» property Contour: TPath; //read only

+ +

C++ » Path Contour; //public field

+ +

C#  » public Path Contour; //read only property

+ + +

Returns a path list which contains any number of vertices.

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

PolyNode.IsHole

+ + +

Del.» IsHole: Boolean; //read only

+ +

C++ » bool IsHole; //field

+ +

C#  » public bool IsHole; //read only property

+ + +

Returns true when the PolyNode's polygon (Contour) is a hole.

Children of outer polygons are always holes, and children of holes are always (nested) outer polygons.
The IsHole property of a PolyTree object is undefined but its children are always top-level outer polygons.

+ +

See Also

+

Overview, Contour, PolyTree

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

PolyNode.IsOpen

+ + +

Del.» IsOpen: Boolean; //read only

+ +

C++ » bool IsOpen; //field

+ +

C#  » public bool IsOpen; //read only property

+ + +

Returns true when the PolyNode's Contour results from a clipping operation on an open contour (path). Only top-level PolyNodes can contain open contours.

+ +

See Also

+

Contour

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

PolyNode.Parent

+ +

Del.» Parent: TPolyNode; //read only

+ +

C++ » PolyNode* Parent; //field

+ +

C#  » public PolyNode Parent; //read only property

+ + +

Returns the parent PolyNode.

The PolyTree object (which is also a PolyNode) does not have a parent and will return a null pointer.

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

PolyNode

+
+ +

PolyNodes are encapsulated within a PolyTree container, and together provide a data structure representing the parent-child relationships of polygon contours returned by Clipper's Execute method.

A PolyNode object represents a single polygon. Its IsHole property indicates whether it's an outer or a hole. PolyNodes may own any number of PolyNode children (Childs), where children of outer polygons are holes, and children of holes are (nested) outer polygons.

+ +

Reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Fields + Methods + Properties +
In PolyNode: +
+ GetNext + ChildCount +
+ + Childs +
+ + Contour +
+ + IsHole +
+ + IsOpen +
+ + Parent +
+

See Also

+

Overview, Clipper.Execute, PolyTree

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

PolyTree.Clear

+ + +

Del.» procedure Clear;

+ +

C++ » void Clear();

+ +

C#  » public void Clear();

+
+ + +

This method clears any PolyNode children contained by PolyTree the object.

Clear does not need to be called explicitly. The Clipper.Execute method that accepts a PolyTree parameter will automatically clear the PolyTree object before propagating it with new PolyNodes. Likewise, PolyTree's destructor will also automatically clear any contained PolyNodes.

+ +

See Also

+

Clipper.Execute

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

PolyTree.GetFirst

+ + +

Del.» function GetFirst: TPolyNode;

+ +

C++ » PolyNode* GetFirst();

+ +

C#  » public PolyNode GetFirst();

+ + +

This method returns the first outer polygon contour if any, otherwise a null pointer.

This function is almost equivalent to calling Childs[0] except that when a PolyTree object is empty (has no children), calling Childs[0] would raise an out of range exception.

+ + + + + + +

See Also

+

PolyNode.GetNext, PolyNode.ChildCount, PolyNode.Childs

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

PolyTree.Total

+ + +

Del.» property Total: Integer; //read only

+ +

C++ » Total(); //read only

+ +

C#  » public int Total; //read only

+ +
+ +

Returns the total number of PolyNodes (polygons) contained within the PolyTree. This value is not to be confused with ChildCount which returns the number of immediate children only (Childs) contained by PolyTree.

+ + +

See Also

+

PolyNode.ChildCount, PolyNode.Childs

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

PolyTree

+

Hierarchy

+

+

   |

+

PolyNode

+
+ +

PolyTree is intended as a read-only data structure that should only be used to receive solutions from clipping and offsetting operations. It's an alternative to the Paths data structure which also receives these solutions. PolyTree's two major advantages over the Paths structure are: it properly represents the parent-child relationships of the returned polygons; it differentiates between open and closed paths. However, since PolyTree is a more complex structure than the Paths structure, and since it's more computationally expensive to process (the Execute method being roughly 5-10% slower), it should used only be when parent-child polygon relationships are needed, or when open paths are being 'clipped'.

An empty PolyTree object can be passed as the solution parameter in Clipper.Execute and in ClipperOffset.Execute. Once the clipping or offseting operation is completed, the method returns with the PolyTree structure filled with data representing the solution.

A PolyTree object is a container for any number of PolyNode children, with each contained PolyNode representing a single polygon contour (either an outer or hole polygon). PolyTree itself is a specialized PolyNode whose immediate children represent the top-level outer polygons of the solution. (Its own Contour property is always empty.) The contained top-level PolyNodes may contain their own PolyNode children representing hole polygons that may also contain children representing nested outer polygons etc. Children of outers will always be holes, and children of holes will always be outers.

PolyTrees can also contain open paths. Open paths will always be represented by top level PolyNodes. Two functions are provided to quickly separate out open and closed paths from a polytree - OpenPathsFromPolyTree and ClosedPathsFromPolyTree.

+ + + + + + + + + + +
+ + + + +
+
+    polytree: 
+    Contour = ()
+    ChildCount = 1
+    Childs[0]: 
+        Contour = ((10,10),(100,10),(100,100),(10,100))
+        IsHole = False
+        ChildCount = 1
+        Childs[0]: 
+            Contour = ((20,20),(20,90),(90,90),(90,20))
+            IsHole = True
+            ChildCount = 2
+            Childs[0]: 
+                Contour = ((30,30),(50,30),(50,50),(30,50))
+                IsHole = False
+                ChildCount = 0
+            Childs[1]: 
+                Contour = ((60,60),(80,60),(80,80),(60,80))
+                IsHole = False
+                ChildCount = 0
+
+            
+ +

+ +

Reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Fields + Methods + Properties +
In PolyTree: +
+ Clear + Total +
+ GetFirst + +
In PolyNode: +
+ GetNext + ChildCount +
+ + Childs +
+ + Contour +
+ + IsHole +
+ + IsOpen +
+ + Parent +
+

See Also

+

Overview, Clipper.Execute, ClipperOffset.Execute, PolyNode, ClosedPathsFromPolyTree, OpenPathsFromPolyTree, Paths

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