@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
30 lines • 1 kB
TypeScript
import type { FnU, IClear } from "@thi.ng/api";
import type { Attribs, GroupAttribs, IHiccupShape2 } from "../api.js";
/**
* Geometry/shape group container for other {@link IHiccupShape2}s, incl. nested
* groups.
*/
export declare class Group implements IClear, IHiccupShape2<Group> {
attribs?: GroupAttribs | undefined;
readonly type = "group";
readonly dim = 2;
children: IHiccupShape2[];
constructor(attribs?: GroupAttribs | undefined, children?: Iterable<IHiccupShape2>);
[Symbol.iterator](): Generator<IHiccupShape2, void, unknown>;
/**
* Appends given `shapes` to this {@link Group.children} array.
*
* @param shapes
*/
add(...shapes: IHiccupShape2[]): this;
/**
* Removes all children from the group.
*/
clear(): void;
copy(): Group;
copyTransformed(fn: FnU<IHiccupShape2>): Group;
withAttribs(attribs: Attribs): Group;
equiv(o: any): boolean;
toHiccup(): any[];
}
//# sourceMappingURL=group.d.ts.map