clipper2-ts 1.5.4-3.9a869ba
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/README.md +67 -0
- package/dist/Clipper.d.ts +114 -0
- package/dist/Clipper.d.ts.map +1 -0
- package/dist/Clipper.js +1134 -0
- package/dist/Clipper.js.map +1 -0
- package/dist/Core.d.ts +150 -0
- package/dist/Core.d.ts.map +1 -0
- package/dist/Core.js +645 -0
- package/dist/Core.js.map +1 -0
- package/dist/Engine.d.ts +337 -0
- package/dist/Engine.d.ts.map +1 -0
- package/dist/Engine.js +2972 -0
- package/dist/Engine.js.map +1 -0
- package/dist/Minkowski.d.ts +16 -0
- package/dist/Minkowski.d.ts.map +1 -0
- package/dist/Minkowski.js +131 -0
- package/dist/Minkowski.js.map +1 -0
- package/dist/Offset.d.ts +85 -0
- package/dist/Offset.d.ts.map +1 -0
- package/dist/Offset.js +649 -0
- package/dist/Offset.js.map +1 -0
- package/dist/RectClip.d.ts +80 -0
- package/dist/RectClip.d.ts.map +1 -0
- package/dist/RectClip.js +1009 -0
- package/dist/RectClip.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +71 -0
- package/dist/index.js.map +1 -0
- package/package.json +64 -0
- package/src/Clipper.ts +1106 -0
- package/src/Core.ts +683 -0
- package/src/Engine.ts +3116 -0
- package/src/Minkowski.ts +153 -0
- package/src/Offset.ts +711 -0
- package/src/RectClip.ts +1028 -0
- package/src/index.ts +146 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* Author : Angus Johnson
|
|
3
|
+
* Date : 2025
|
|
4
|
+
* Website : https://www.angusj.com
|
|
5
|
+
* Copyright : Angus Johnson 2010-2025
|
|
6
|
+
* License : https://www.boost.org/LICENSE_1_0.txt
|
|
7
|
+
*******************************************************************************/
|
|
8
|
+
|
|
9
|
+
// Export core types and interfaces
|
|
10
|
+
export {
|
|
11
|
+
Point64,
|
|
12
|
+
PointD,
|
|
13
|
+
Path64,
|
|
14
|
+
PathD,
|
|
15
|
+
Paths64,
|
|
16
|
+
PathsD,
|
|
17
|
+
Rect64,
|
|
18
|
+
RectD,
|
|
19
|
+
ClipType,
|
|
20
|
+
PathType,
|
|
21
|
+
FillRule,
|
|
22
|
+
PointInPolygonResult,
|
|
23
|
+
InternalClipper,
|
|
24
|
+
Point64Utils,
|
|
25
|
+
PointDUtils,
|
|
26
|
+
Rect64Utils,
|
|
27
|
+
RectDUtils,
|
|
28
|
+
PathUtils,
|
|
29
|
+
PathsUtils,
|
|
30
|
+
InvalidRect64,
|
|
31
|
+
InvalidRectD
|
|
32
|
+
} from './Core';
|
|
33
|
+
|
|
34
|
+
// Export engine classes
|
|
35
|
+
export {
|
|
36
|
+
VertexFlags,
|
|
37
|
+
Vertex,
|
|
38
|
+
LocalMinima,
|
|
39
|
+
createLocalMinima, // deprecated: use new LocalMinima() directly
|
|
40
|
+
IntersectNode,
|
|
41
|
+
createIntersectNode,
|
|
42
|
+
OutPt,
|
|
43
|
+
JoinWith,
|
|
44
|
+
HorzPosition,
|
|
45
|
+
OutRec,
|
|
46
|
+
HorzSegment,
|
|
47
|
+
HorzJoin,
|
|
48
|
+
Active,
|
|
49
|
+
ClipperEngine,
|
|
50
|
+
ReuseableDataContainer64,
|
|
51
|
+
PolyPathBase,
|
|
52
|
+
PolyPath64,
|
|
53
|
+
PolyPathD,
|
|
54
|
+
PolyTree64,
|
|
55
|
+
PolyTreeD,
|
|
56
|
+
ClipperBase,
|
|
57
|
+
Clipper64,
|
|
58
|
+
ClipperD
|
|
59
|
+
} from './Engine';
|
|
60
|
+
|
|
61
|
+
// Export offset functionality
|
|
62
|
+
export {
|
|
63
|
+
JoinType,
|
|
64
|
+
EndType,
|
|
65
|
+
ClipperOffset
|
|
66
|
+
} from './Offset';
|
|
67
|
+
|
|
68
|
+
// Export rect clipping
|
|
69
|
+
export {
|
|
70
|
+
OutPt2,
|
|
71
|
+
RectClip64,
|
|
72
|
+
RectClipLines64
|
|
73
|
+
} from './RectClip';
|
|
74
|
+
|
|
75
|
+
// Export Minkowski operations
|
|
76
|
+
export {
|
|
77
|
+
Minkowski
|
|
78
|
+
} from './Minkowski';
|
|
79
|
+
|
|
80
|
+
// Export main Clipper namespace with convenience functions
|
|
81
|
+
export { Clipper } from './Clipper';
|
|
82
|
+
|
|
83
|
+
// Re-export main functions for convenience
|
|
84
|
+
import { Clipper } from './Clipper';
|
|
85
|
+
|
|
86
|
+
export const {
|
|
87
|
+
intersect,
|
|
88
|
+
intersectD,
|
|
89
|
+
union,
|
|
90
|
+
unionD,
|
|
91
|
+
difference,
|
|
92
|
+
differenceD,
|
|
93
|
+
xor,
|
|
94
|
+
xorD,
|
|
95
|
+
booleanOp,
|
|
96
|
+
booleanOpWithPolyTree,
|
|
97
|
+
booleanOpD,
|
|
98
|
+
booleanOpDWithPolyTree,
|
|
99
|
+
inflatePaths,
|
|
100
|
+
inflatePathsD,
|
|
101
|
+
rectClip,
|
|
102
|
+
rectClipLines,
|
|
103
|
+
minkowskiSum,
|
|
104
|
+
minkowskiSumD,
|
|
105
|
+
minkowskiDiff,
|
|
106
|
+
minkowskiDiffD,
|
|
107
|
+
area,
|
|
108
|
+
areaPaths,
|
|
109
|
+
areaD,
|
|
110
|
+
areaPathsD,
|
|
111
|
+
isPositive,
|
|
112
|
+
isPositiveD,
|
|
113
|
+
getBounds,
|
|
114
|
+
getBoundsPaths,
|
|
115
|
+
getBoundsD,
|
|
116
|
+
getBoundsPathsD,
|
|
117
|
+
makePath,
|
|
118
|
+
makePathD,
|
|
119
|
+
scalePath64,
|
|
120
|
+
scalePaths64,
|
|
121
|
+
scalePathD,
|
|
122
|
+
scalePathsD,
|
|
123
|
+
translatePath,
|
|
124
|
+
translatePaths,
|
|
125
|
+
translatePathD,
|
|
126
|
+
translatePathsD,
|
|
127
|
+
reversePath,
|
|
128
|
+
reversePathD,
|
|
129
|
+
reversePaths,
|
|
130
|
+
reversePathsD,
|
|
131
|
+
stripDuplicates,
|
|
132
|
+
trimCollinear,
|
|
133
|
+
trimCollinearD,
|
|
134
|
+
pointInPolygon,
|
|
135
|
+
pointInPolygonD,
|
|
136
|
+
ellipse,
|
|
137
|
+
ellipseD,
|
|
138
|
+
simplifyPath,
|
|
139
|
+
simplifyPaths,
|
|
140
|
+
simplifyPathD,
|
|
141
|
+
simplifyPathsD,
|
|
142
|
+
ramerDouglasPeucker,
|
|
143
|
+
ramerDouglasPeuckerPaths,
|
|
144
|
+
ramerDouglasPeuckerD,
|
|
145
|
+
ramerDouglasPeuckerPathsD
|
|
146
|
+
} = Clipper;
|