UNPKG

@thi.ng/geom

Version:

Functional, polymorphic API for 2D geometry types & SVG generation

14 lines 575 B
import type { Fn } from "@thi.ng/api"; import type { ReadonlyVec, Vec } from "@thi.ng/vectors"; import type { Attribs, IHiccupShape2 } from "../api.js"; import { APC } from "./apc.js"; export declare class Polygon extends APC implements IHiccupShape2<Polygon> { readonly type = "poly"; readonly dim = 2; add(...points: Vec[]): void; copy(): Polygon; copyTransformed(fn: Fn<ReadonlyVec[], Vec[]>): Polygon; withAttribs(attribs: Attribs): Polygon; toHiccup(): (string | Vec<number>[] | Attribs | undefined)[]; } //# sourceMappingURL=polygon.d.ts.map