@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
28 lines • 1.02 kB
TypeScript
import type { Fn } from "@thi.ng/api";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
import type { Attribs, IHiccupPathSegment, IHiccupShape2 } from "../api.js";
import { APC } from "./apc.js";
export declare class Polyline extends APC implements IHiccupShape2<Polyline>, IHiccupPathSegment {
readonly type = "polyline";
readonly dim = 2;
add(...points: Vec[]): void;
copy(): Polyline;
copyTransformed(fn: Fn<ReadonlyVec[], Vec[]>): Polyline;
withAttribs(attribs: Attribs): Polyline;
toHiccup(): (string | Vec<number>[] | {
fill: string;
__samples?: Partial<import("../api.js").SamplingOpts> | number;
__prec?: number;
rotate?: number;
rotateX?: number;
rotateY?: number;
rotateZ?: number;
scale?: number | ReadonlyVec;
translate?: ReadonlyVec;
transform?: ReadonlyVec;
stroke?: any;
weight?: number;
})[];
toHiccupPathSegments(): any[];
}
//# sourceMappingURL=polyline.d.ts.map