/******************************************************************************* * Author : Angus Johnson * * Date : 5 March 2025 * * Website : https://www.angusj.com * * Copyright : Angus Johnson 2010-2025 * * Purpose : This module contains simple functions that will likely cover * * most polygon boolean and offsetting needs, while also avoiding * * the inherent complexities of the other modules. * * License : https://www.boost.org/LICENSE_1_0.txt * *******************************************************************************/ import { Point64, PointD, Path64, PathD, Paths64, PathsD, Rect64, RectD, ClipType, FillRule, PointInPolygonResult } from './Core.js'; import { PolyTree64, PolyTreeD, PolyPathD } from './Engine.js'; import { JoinType, EndType } from './Offset.js'; import { TriangulateResult } from './Triangulation.js'; export declare const invalidRect64: Rect64; export declare const invalidRectD: RectD; export declare function intersect(subject: Paths64, clip: Paths64, fillRule: FillRule): Paths64; export declare function intersectD(subject: PathsD, clip: PathsD, fillRule: FillRule, precision?: number): PathsD; export declare function union(subject: Paths64, fillRule: FillRule): Paths64; export declare function union(subject: Paths64, clip: Paths64, fillRule: FillRule): Paths64; export declare function unionD(subject: PathsD, fillRule: FillRule): PathsD; export declare function unionD(subject: PathsD, clip: PathsD, fillRule: FillRule, precision?: number): PathsD; export declare function difference(subject: Paths64, clip: Paths64, fillRule: FillRule): Paths64; export declare function differenceD(subject: PathsD, clip: PathsD, fillRule: FillRule, precision?: number): PathsD; export declare function xor(subject: Paths64, clip: Paths64, fillRule: FillRule): Paths64; export declare function xorD(subject: PathsD, clip: PathsD, fillRule: FillRule, precision?: number): PathsD; export declare function booleanOp(clipType: ClipType, subject: Paths64 | null, clip: Paths64 | null, fillRule: FillRule): Paths64; export declare function booleanOpWithPolyTree(clipType: ClipType, subject: Paths64 | null, clip: Paths64 | null, polytree: PolyTree64, fillRule: FillRule): void; export declare function booleanOpD(clipType: ClipType, subject: PathsD, clip: PathsD | null, fillRule: FillRule, precision?: number): PathsD; export declare function booleanOpDWithPolyTree(clipType: ClipType, subject: PathsD | null, clip: PathsD | null, polytree: PolyTreeD, fillRule: FillRule, precision?: number): void; export declare function inflatePaths(paths: Paths64, delta: number, joinType: JoinType, endType: EndType, miterLimit?: number, arcTolerance?: number): Paths64; export declare function inflatePathsD(paths: PathsD, delta: number, joinType: JoinType, endType: EndType, miterLimit?: number, precision?: number, arcTolerance?: number): PathsD; export declare function rectClip(rect: Rect64, paths: Paths64): Paths64; export declare function rectClip(rect: Rect64, path: Path64): Paths64; export declare function rectClip(rect: RectD, paths: PathsD, precision?: number): PathsD; export declare function rectClip(rect: RectD, path: PathD, precision?: number): PathsD; export declare function rectClipLines(rect: Rect64, paths: Paths64): Paths64; export declare function rectClipLines(rect: Rect64, path: Path64): Paths64; export declare function rectClipLines(rect: RectD, paths: PathsD, precision?: number): PathsD; export declare function rectClipLines(rect: RectD, path: PathD, precision?: number): PathsD; export declare function minkowskiSum(pattern: Path64, path: Path64, isClosed: boolean): Paths64; export declare function minkowskiSumD(pattern: PathD, path: PathD, isClosed: boolean): PathsD; export declare function minkowskiDiff(pattern: Path64, path: Path64, isClosed: boolean): Paths64; export declare function minkowskiDiffD(pattern: PathD, path: PathD, isClosed: boolean): PathsD; export declare function area(path: Path64): number; export declare function areaPaths(paths: Paths64): number; export declare function areaD(path: PathD): number; export declare function areaPathsD(paths: PathsD): number; export declare function isPositive(poly: Path64): boolean; export declare function isPositiveD(poly: PathD): boolean; export declare function path64ToString(path: Path64): string; export declare function paths64ToString(paths: Paths64): string; export declare function pathDToString(path: PathD, precision?: number): string; export declare function pathsDToString(paths: PathsD, precision?: number): string; export declare function offsetPath(path: Path64, dx: number, dy: number): Path64; export declare function scalePoint64(pt: Point64, scale: number): Point64; export declare function scalePointD(pt: Point64, scale: number): PointD; export declare function scaleRect(rec: RectD, scale: number): Rect64; export declare function scalePath(path: Path64, scale: number): Path64; export declare function scalePaths(paths: Paths64, scale: number): Paths64; export declare function scalePathD(path: PathD, scale: number): PathD; export declare function scalePathsD(paths: PathsD, scale: number): PathsD; export declare function scalePath64(path: PathD, scale: number): Path64; export declare function scalePaths64(paths: PathsD, scale: number): Paths64; export declare function scalePathDFromInt(path: Path64, scale: number): PathD; export declare function scalePathsDFromInt(paths: Paths64, scale: number): PathsD; export declare function path64FromD(path: PathD): Path64; export declare function paths64FromD(paths: PathsD): Paths64; export declare function pathsD(paths: Paths64): PathsD; export declare function pathD(path: Path64): PathD; export declare function translatePath(path: Path64, dx: number, dy: number): Path64; export declare function translatePaths(paths: Paths64, dx: number, dy: number): Paths64; export declare function translatePathD(path: PathD, dx: number, dy: number): PathD; export declare function translatePathsD(paths: PathsD, dx: number, dy: number): PathsD; export declare function reversePath(path: Path64): Path64; export declare function reversePathD(path: PathD): PathD; export declare function reversePaths(paths: Paths64): Paths64; export declare function reversePathsD(paths: PathsD): PathsD; export declare function getBounds(path: Path64): Rect64; export declare function getBoundsPaths(paths: Paths64): Rect64; export declare function getBoundsD(path: PathD): RectD; export declare function getBoundsPathsD(paths: PathsD): RectD; export declare function makePath(arr: number[]): Path64; export declare function makePathD(arr: number[]): PathD; export declare function sqr(val: number): number; export declare function distanceSqr(pt1: Point64, pt2: Point64): number; export declare function midPoint(pt1: Point64, pt2: Point64): Point64; export declare function midPointD(pt1: PointD, pt2: PointD): PointD; export declare function inflateRect(rec: Rect64, dx: number, dy: number): void; export declare function inflateRectD(rec: RectD, dx: number, dy: number): void; export declare function pointsNearEqual(pt1: PointD, pt2: PointD, distanceSqrd: number): boolean; export declare function stripNearDuplicates(path: PathD, minEdgeLenSqrd: number, isClosedPath: boolean): PathD; export declare function stripDuplicates(path: Path64, isClosedPath: boolean): Path64; export declare function polyTreeToPaths64(polyTree: PolyTree64): Paths64; export declare function addPolyNodeToPathsD(polyPath: PolyPathD, paths: PathsD): void; export declare function polyTreeToPathsD(polyTree: PolyTreeD): PathsD; export declare function perpendicDistFromLineSqrd(pt: PointD, line1: PointD, line2: PointD): number; export declare function perpendicDistFromLineSqrd64(pt: Point64, line1: Point64, line2: Point64): number; export declare function ramerDouglasPeucker(path: Path64, epsilon: number): Path64; export declare function ramerDouglasPeuckerPaths(paths: Paths64, epsilon: number): Paths64; export declare function ramerDouglasPeuckerD(path: PathD, epsilon: number): PathD; export declare function ramerDouglasPeuckerPathsD(paths: PathsD, epsilon: number): PathsD; export declare function simplifyPath(path: Path64, epsilon: number, isClosedPath?: boolean): Path64; export declare function simplifyPaths(paths: Paths64, epsilon: number, isClosedPaths?: boolean): Paths64; export declare function simplifyPathD(path: PathD, epsilon: number, isClosedPath?: boolean): PathD; export declare function simplifyPathsD(paths: PathsD, epsilon: number, isClosedPath?: boolean): PathsD; export declare function trimCollinear(path: Path64, isOpen?: boolean): Path64; export declare function trimCollinearD(path: PathD, precision: number, isOpen?: boolean): PathD; export declare function pointInPolygon(pt: Point64, polygon: Path64): PointInPolygonResult; export declare function pointInPolygonD(pt: PointD, polygon: PathD, precision?: number): PointInPolygonResult; export declare function ellipse(center: Point64, radiusX: number, radiusY?: number, steps?: number): Path64; export declare function ellipseD(center: PointD, radiusX: number, radiusY?: number, steps?: number): PathD; export declare function triangulate(pp: Paths64, useDelaunay?: boolean): { result: TriangulateResult; solution: Paths64; }; export declare function triangulateD(pp: PathsD, decPlaces: number, useDelaunay?: boolean): { result: TriangulateResult; solution: PathsD; }; /** * @deprecated Use named exports or \`import * as Clipper\` instead * Compatibility alias for direct imports from Clipper.js */ export declare const Clipper: { invalidRect64: Rect64; invalidRectD: RectD; intersect: typeof intersect; intersectD: typeof intersectD; union: typeof union; unionD: typeof unionD; difference: typeof difference; differenceD: typeof differenceD; xor: typeof xor; xorD: typeof xorD; booleanOp: typeof booleanOp; booleanOpWithPolyTree: typeof booleanOpWithPolyTree; booleanOpD: typeof booleanOpD; booleanOpDWithPolyTree: typeof booleanOpDWithPolyTree; inflatePaths: typeof inflatePaths; inflatePathsD: typeof inflatePathsD; rectClip: typeof rectClip; rectClipLines: typeof rectClipLines; minkowskiSum: typeof minkowskiSum; minkowskiSumD: typeof minkowskiSumD; minkowskiDiff: typeof minkowskiDiff; minkowskiDiffD: typeof minkowskiDiffD; area: typeof area; areaPaths: typeof areaPaths; areaD: typeof areaD; areaPathsD: typeof areaPathsD; isPositive: typeof isPositive; isPositiveD: typeof isPositiveD; path64ToString: typeof path64ToString; paths64ToString: typeof paths64ToString; pathDToString: typeof pathDToString; pathsDToString: typeof pathsDToString; offsetPath: typeof offsetPath; scalePoint64: typeof scalePoint64; scalePointD: typeof scalePointD; scaleRect: typeof scaleRect; scalePath: typeof scalePath; scalePaths: typeof scalePaths; scalePathD: typeof scalePathD; scalePathsD: typeof scalePathsD; scalePath64: typeof scalePath64; scalePaths64: typeof scalePaths64; scalePathDFromInt: typeof scalePathDFromInt; scalePathsDFromInt: typeof scalePathsDFromInt; path64FromD: typeof path64FromD; paths64FromD: typeof paths64FromD; pathsD: typeof pathsD; pathD: typeof pathD; translatePath: typeof translatePath; translatePaths: typeof translatePaths; translatePathD: typeof translatePathD; translatePathsD: typeof translatePathsD; reversePath: typeof reversePath; reversePathD: typeof reversePathD; reversePaths: typeof reversePaths; reversePathsD: typeof reversePathsD; getBounds: typeof getBounds; getBoundsPaths: typeof getBoundsPaths; getBoundsD: typeof getBoundsD; getBoundsPathsD: typeof getBoundsPathsD; makePath: typeof makePath; makePathD: typeof makePathD; sqr: typeof sqr; distanceSqr: typeof distanceSqr; midPoint: typeof midPoint; midPointD: typeof midPointD; inflateRect: typeof inflateRect; inflateRectD: typeof inflateRectD; pointsNearEqual: typeof pointsNearEqual; stripNearDuplicates: typeof stripNearDuplicates; stripDuplicates: typeof stripDuplicates; polyTreeToPaths64: typeof polyTreeToPaths64; addPolyNodeToPathsD: typeof addPolyNodeToPathsD; polyTreeToPathsD: typeof polyTreeToPathsD; perpendicDistFromLineSqrd: typeof perpendicDistFromLineSqrd; perpendicDistFromLineSqrd64: typeof perpendicDistFromLineSqrd64; ramerDouglasPeucker: typeof ramerDouglasPeucker; ramerDouglasPeuckerPaths: typeof ramerDouglasPeuckerPaths; ramerDouglasPeuckerD: typeof ramerDouglasPeuckerD; ramerDouglasPeuckerPathsD: typeof ramerDouglasPeuckerPathsD; simplifyPath: typeof simplifyPath; simplifyPaths: typeof simplifyPaths; simplifyPathD: typeof simplifyPathD; simplifyPathsD: typeof simplifyPathsD; trimCollinear: typeof trimCollinear; trimCollinearD: typeof trimCollinearD; pointInPolygon: typeof pointInPolygon; pointInPolygonD: typeof pointInPolygonD; ellipse: typeof ellipse; ellipseD: typeof ellipseD; triangulate: typeof triangulate; triangulateD: typeof triangulateD; }; //# sourceMappingURL=Clipper.d.ts.map