@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
17 lines • 628 B
TypeScript
import { type Vec } from "@thi.ng/vectors/api";
import type { AABBLike, Attribs, IHiccupShape2 } from "../api.js";
export declare class Rect implements AABBLike, IHiccupShape2<Rect> {
pos: Vec;
attribs?: Attribs | undefined;
readonly type = "rect";
readonly dim = 2;
size: Vec;
constructor(pos?: Vec, size?: number | Vec, attribs?: Attribs | undefined);
copy(): Rect;
withAttribs(attribs: Attribs): Rect;
min(): Vec<number>;
max(): Vec<number>;
offset(offset: number): this;
toHiccup(): (string | number | Vec<number> | Attribs | undefined)[];
}
//# sourceMappingURL=rect.d.ts.map