import { Class } from 'everyday-types'; import { Intersect } from './core'; import { Line } from './line'; import { Point } from './point'; import { Shape, ShapeLike } from './shape'; export declare type Placement = 'nw' | 'nwr' | 'nel' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w'; export declare class Rect extends Shape implements DOMRect { #private; static fromElement(el: HTMLElement & { rect?: Rect; }): Rect; static fromObject(obj: ShapeLike): Rect; static fromPoints(topLeft: Point, bottomRight: Point): Rect; static fromUnsortedPoints(p1: Point, p2: Point): Rect; static combine(rects: Rect[]): Rect; static compare(a: Rect | void, b: Rect): boolean; static boundingRect: typeof Rect.combine; x: number; y: number; width: number; height: number; constructor(obj: ShapeLike); constructor(x?: number, y?: number, width?: number, height?: number); [Symbol.iterator](): IterableIterator; toJSON(): { x: number; y: number; width: number; height: number; }; toSVGPath(): string; toString(): string; draw(this: this, color?: string, position?: string): HTMLDivElement; set(this: this, other: Rect): this; setWidth(width: number): this; setHeight(height: number): this; setPosition(this: this, other: Shape): this; setSize(this: this, other: Shape): this; get points(): Point[]; get pos(): Point; get position(): Point; get size(): Point; get center(): Point; get topLeft(): Point; get topRight(): Point; get bottomLeft(): Point; get bottomRight(): Point; get right(): number; set right(x: number); get bottom(): number; set bottom(y: number); maybeCalculateLines(): void; get leftLine(): Line; get topLine(): Line; get rightLine(): Line; get bottomLine(): Line; interpolate(this: this, other: Rect, t: number): this; interpolateSelf(this: this, other: Rect, t: number): this; round(this: this): this; roundSelf(this: this): this; multiply(this: this, x: Shape): InstanceType>; multiply(this: this, x: number, y?: number, w?: number, h?: number): InstanceType>; multiplySelf(this: this, x: Shape): InstanceType>; multiplySelf(this: this, x: number, y?: number, w?: number, h?: number): InstanceType>; transform(this: this, matrix: DOMMatrix): this; transformSelf(this: this, matrix: DOMMatrix): this; normalize(this: this, matrix: DOMMatrix): InstanceType>; normalize(this: this, other: Rect): InstanceType>; normalizeSelf(this: this, matrix: DOMMatrix): InstanceType>; normalizeSelf(this: this, other: Rect): InstanceType>; equals(this: this, other: Rect): boolean; intersectionRect(this: this, other: Rect): Intersect; intersectsRect(this: this, other: Rect): boolean; withinRect(this: this, other: Rect): boolean; distanceRect(this: this, other: Rect): Point; collisionResponse(this: this, other: Rect): Point; place(this: this, other: Rect, placement: Placement): this; placeSelf(this: this, other: Rect, placement: Placement): this; }