UNPKG

950 BTypeScriptView Raw
1import * as matrix from './matrix';
2import { PointLike } from './Point';
3declare class BoundingRect {
4 x: number;
5 y: number;
6 width: number;
7 height: number;
8 constructor(x: number, y: number, width: number, height: number);
9 union(other: BoundingRect): void;
10 applyTransform(m: matrix.MatrixArray): void;
11 calculateTransform(b: RectLike): matrix.MatrixArray;
12 intersect(b: RectLike, mtv?: PointLike): boolean;
13 contain(x: number, y: number): boolean;
14 clone(): BoundingRect;
15 copy(other: RectLike): void;
16 plain(): RectLike;
17 isFinite(): boolean;
18 isZero(): boolean;
19 static create(rect: RectLike): BoundingRect;
20 static copy(target: RectLike, source: RectLike): void;
21 static applyTransform(target: RectLike, source: RectLike, m: matrix.MatrixArray): void;
22}
23export declare type RectLike = {
24 x: number;
25 y: number;
26 width: number;
27 height: number;
28};
29export default BoundingRect;