import type { Box } from './Box'; import type { Point } from './Point'; import type { Vector } from './Vector'; export type AnyShape = Shape; /** * Base class representing shape * Implement common methods of affine transformations */ export declare class Shape { get name(): string; get box(): Box; clone(): void; /** * Returns new shape translated by given vector. * Translation vector may be also defined by a pair of numbers. */ translate(v: Vector): T; translate(p: { x: number; y: number; }): T; translate(x: number, y: number): T; /** * Returns new shape rotated by given angle around given center point. * If center point is omitted, rotates around zero point (0,0). * Positive value of angle defines rotation in counterclockwise direction, * negative angle defines rotation in clockwise direction * @param angle - angle in radians * @param [center=(0,0)] center */ rotate(angle: number, center?: Point): T; /** * Return new shape with coordinates multiplied by scaling factor */ scale(s: number): T; scale(sx: number, sy: number): T; transform(...args: any[]): T; /** * This method returns an object that defines how data will be * serialized when called JSON.stringify() method * @returns {Object} */ toJSON(): this & { name: string; }; svg(attrs?: {}): void; } /** * There is a circular dependency between Shape & Point, so we inject point later * when everything is properly defined. * @private */ export declare function _setupShape(point: Function): void; //# sourceMappingURL=Shape.d.ts.map