declare enum TransformationOrigin { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3, CENTER = 4, TOP_LEFT = 5, TOP_RIGHT = 6, BOTTOM_LEFT = 7, BOTTOM_RIGHT = 8 } declare class Rect { x: number; y: number; width: number; height: number; constructor(x?: number, y?: number, width?: number, height?: number); get left(): number; get right(): number; get top(): number; get bottom(): number; static fromSimpleRect(source?: SimpleRect): Rect; static fromPoints(p1: SimplePoint, p2: SimplePoint): Rect; static getCenterPoint(source: SimpleRect): Point; static getArea(source: SimpleRect): Rect; static containsX(source: SimpleRect, x: number): boolean; static containsY(source: SimpleRect, y: number): boolean; static containsPoint(source: SimpleRect, target: SimplePoint): boolean; static containsRect(source: SimpleRect, target: SimpleRect): boolean; static intersectsRect(source: SimpleRect, target: SimpleRect): boolean; static translateX(source: SimpleRect, x: number): Rect; static translateY(source: SimpleRect, y: number): Rect; static translateByCoords(source: SimpleRect, x: number, y: number): Rect; static translateByPoint(source: SimpleRect, target: SimplePoint): Rect; static expandWidth(source: SimpleRect, width: number, origin?: TransformationOrigin): Rect; static expandHeight(source: SimpleRect, height: number, origin?: TransformationOrigin): Rect; static expand(source: SimpleRect, width: number, height: number, origin?: TransformationOrigin): Rect; static scaleWidth(source: SimpleRect, width_decimal_percent: number, origin?: TransformationOrigin): Rect; static scaleHeight(source: SimpleRect, height_decimal_percent: number, origin?: TransformationOrigin): Rect; static scale(source: SimpleRect, width_decimal_percent: number, height_decimal_percent: number, origin?: TransformationOrigin): Rect; static union(...rect_list: SimpleRect[]): Rect; clone(): Rect; getCenterPoint(): Point; getArea(): number; containsX(x: number): boolean; containsY(y: number): boolean; containsPoint(point: SimplePoint): boolean; containsRect(rect: SimpleRect): boolean; intersectsRect(rect: SimpleRect): boolean; translateX(x: number): this; translateY(y: number): this; translateByCoords(x: number, y: number): this; translateByPoint(point: SimplePoint): this; expandWidth(width: number, origin?: TransformationOrigin): this; expandHeight(height: number, origin?: TransformationOrigin): this; expand(width: number, height: number, origin?: TransformationOrigin): this; scaleWidth(decimal_percent: number, origin?: TransformationOrigin): this; scaleHeight(decimal_percent: number, origin?: TransformationOrigin): this; scale(width_decimal_percent: number, height_decimal_percent: number, origin?: TransformationOrigin): this; union(...rect_list: SimpleRect[]): this; } interface SimpleRect { x: number; y: number; width: number; height: number; } declare class Point { x: number; y: number; constructor(x: number, y: number); static fromSimplePoint(source: SimplePoint): Point; static getMagnitude(source: SimplePoint, target: SimplePoint): number; static getDotProductWithPoint(source: SimplePoint, target: SimplePoint): number; static getDistanceToPoint(source: SimplePoint, target: SimplePoint): number; static translateX(source: SimplePoint, x: number): Point; static translateY(source: SimplePoint, y: number): Point; static translateByCoords(source: SimplePoint, x: number, y: number): Point; static translateByPoint(source: SimplePoint, target: SimplePoint): Point; static clampX(source: SimplePoint, min: number, max: number): Point; static clampY(source: SimplePoint, min: number, max: number): Point; static clampByRect(source: SimplePoint, target: SimpleRect): Point; clone(): Point; getMagnitude(): number; getDotProductWithPoint(target: SimplePoint): number; getDistanceToPoint(point: SimplePoint): number; translateX(x: number): this; translateY(y: number): this; translateByCoords(x: number, y: number): this; translateByPoint(point: SimplePoint): this; clampX(min: number, max: number): this; clampY(min: number, max: number): this; clampByRect(rect: SimpleRect): this; } interface SimplePoint { x: number; y: number; } declare class Line { a: SimplePoint; b: SimplePoint; constructor(a: SimplePoint, b: SimplePoint); static fromSimpleLine(source: SimpleLine): Line; static getLength(line: SimpleLine): number; static getCenterPoint(source: SimpleLine): Point; static getFormula(source: SimpleLine): { a: number; b: number; c: number; }; static getIntersection(source: SimpleLine, target: SimpleLine): Point; clone(): Line; getLength(): number; getCenterPoint(): Point; getFormula(): { a: number; b: number; c: number; }; getIntersection(target: SimpleLine): Point; } interface SimpleLine { a: SimplePoint; b: SimplePoint; } declare class Circle { origin: Point; radius: number; constructor(origin: SimplePoint, radius: number); static fromSimpleCircle(source: SimpleCircle): Circle; static getDiameter(source: SimpleCircle): number; static getArea(source: SimpleCircle): number; static containsPoint(source: SimpleCircle, target: SimplePoint): boolean; clone(): Circle; getDiameter(): number; getArea(): number; containsPoint(point: SimplePoint): boolean; } interface SimpleCircle { origin: SimplePoint; radius: number; } declare class Triangle { a: Point; b: Point; c: Point; constructor(a: SimplePoint, b: SimplePoint, c: SimplePoint); static fromSimpleTriangle(source: SimpleTriangle): Triangle; static getHeight(source: SimpleTriangle): number; static getArea(source: SimpleTriangle): number; static getAngleAInRadians(source: SimpleTriangle): number; static getAngleAInDegrees(source: SimpleTriangle): number; static getAngleBInRadians(source: SimpleTriangle): number; static getAngleBInDegrees(source: SimpleTriangle): number; static getAngleCInRadians(source: SimpleTriangle): number; static getAngleCInDegrees(source: SimpleTriangle): number; clone(): Triangle; getHeight(): number; getArea(): number; getAngleAInRadians(): number; getAngleAInDegrees(): number; getAngleBInRadians(): number; getAngleBInDegrees(): number; getAngleCInRadians(): number; getAngleCInDegrees(): number; } interface SimpleTriangle { a: SimplePoint; b: SimplePoint; c: SimplePoint; } declare class Quadrilateral { a: Point; b: Point; c: Point; d: Point; constructor(a: SimplePoint, b: SimplePoint, c: SimplePoint, d: SimplePoint); static fromSimpleQuadrilateral(source: SimpleQuadrilateral): Quadrilateral; static getArea(source: SimpleQuadrilateral): number; static containsPoint(source: SimpleQuadrilateral, target: SimplePoint): boolean; clone(): Quadrilateral; getArea(): number; containsPoint(point: SimplePoint): boolean; } interface SimpleQuadrilateral { top_left: SimplePoint; top_right: SimplePoint; bottom_left: SimplePoint; bottom_right: SimplePoint; } export { Circle, Line, Point, Quadrilateral, Rect, SimpleCircle, SimpleLine, SimplePoint, SimpleQuadrilateral, SimpleRect, SimpleTriangle, TransformationOrigin, Triangle };