UNPKG

@avdl/martinez

Version:

TypeScript library for polygon boolean operations

46 lines 1.16 kB
import { Segment } from './Segment'; import type { Point } from './Point'; /** * Represents a contour (closed polygon boundary) with multiple vertices */ export declare class Contour { private points; private holeOf; private holeIds; private depth; constructor(points?: Point[]); nvertices(): number; segment(i: number): Segment; addPoint(point: Point): void; getPoints(): Point[]; setPoints(points: Point[]): void; /** * Set this contour as a hole of another contour */ setHoleOf(parentIndex: number): void; /** * Get the parent contour index if this is a hole */ getHoleOf(): number | null; /** * Add a hole to this contour */ addHole(holeIndex: number): void; /** * Get all hole indices for this contour */ getHoles(): number[]; /** * Set the nesting depth */ setDepth(depth: number): void; /** * Get the nesting depth */ getDepth(): number; /** * Check if this contour is a hole */ isHole(): boolean; } //# sourceMappingURL=Contour.d.ts.map