@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
44 lines • 1.11 kB
TypeScript
import type { MultiFn1 } from "@thi.ng/defmulti";
import type { IShape } from "./api.js";
/**
* Function overrides for {@link flip}.
*/
export type FlipFn = {
<T extends IShape>(shape: T): T;
} & MultiFn1<IShape, IShape>;
/**
* Only for vertex-based shapes with implicit or explicit ordering. Reverses
* vertex ordering or general direction (e.g. for {@link Ray}) of given shape.
* In-place operation, modifies original shape.
*
* @remarks
* Currently implemented for:
*
* - {@link Arc}
* - {@link ComplexPolygon}
* - {@link Cubic}
* - {@link Cubic3}
* - {@link Group} (only eligible shapes)
* - {@link Group3} (only eligible shapes)
* - {@link Line}
* - {@link Line3}
* - {@link Path} (currently a no-op)
* - {@link Points}
* - {@link Points3}
* - {@link Polygon}
* - {@link Polygon3}
* - {@link Polyline}
* - {@link Polyline3}
* - {@link Quad}
* - {@link Quad3}
* - {@link Quadratic}
* - {@link Quadratic3}
* - {@link Ray}
* - {@link Ray3}
* - {@link Triangle}
* - {@link Triangle3}
*
* @param shape
*/
export declare const flip: FlipFn;
//# sourceMappingURL=flip.d.ts.map