UNPKG

635 BTypeScriptView Raw
1/**
2 * Rectangle helper class.
3 *
4 * @public
5 * {@docCategory Rectangle}
6 */
7export declare class Rectangle {
8 top: number;
9 bottom: number;
10 left: number;
11 right: number;
12 constructor(left?: number, right?: number, top?: number, bottom?: number);
13 /**
14 * Calculated automatically by subtracting the right from left
15 */
16 readonly width: number;
17 /**
18 * Calculated automatically by subtracting the bottom from top.
19 */
20 readonly height: number;
21 /**
22 * Tests if another rect is approximately equal to this rect (within 4 decimal places.)
23 */
24 equals(rect: Rectangle): boolean;
25}