@flashport/flashport
Version:
FlashPort is a TypeScript 2D graphics library that largely replicates the Flash ActionScript 3.0 library
43 lines (42 loc) • 1.54 kB
TypeScript
import { Point } from "./Point";
import { Matrix } from "./Matrix";
export declare class Rectangle extends Object {
x: number;
y: number;
width: number;
height: number;
constructor(x?: number, y?: number, width?: number, height?: number);
get left(): number;
set left(value: number);
get right(): number;
set right(value: number);
get top(): number;
set top(value: number);
get bottom(): number;
set bottom(value: number);
get topLeft(): Point;
set topLeft(value: Point);
get bottomRight(): Point;
set bottomRight(value: Point);
get size(): Point;
set size(value: Point);
clone: () => Rectangle;
isEmpty: () => boolean;
setEmpty: () => void;
inflate: (dx: number, dy: number) => void;
inflatePoint: (point: Point) => void;
offset: (dx: number, dy: number) => void;
offsetPoint: (point: Point) => void;
contains: (x: number, y: number) => boolean;
containsPoint: (point: Point) => boolean;
containsRect: (rect: Rectangle) => boolean;
intersection: (toIntersect: Rectangle) => Rectangle;
intersects: (toIntersect: Rectangle) => boolean;
union: (toUnion: Rectangle) => Rectangle;
equals: (toCompare: Rectangle) => boolean;
toString: () => string;
copyFrom: (sourceRect: Rectangle) => void;
setTo: (xa: number, ya: number, widtha: number, heighta: number) => void;
__transform: (rect: Rectangle, m: Matrix) => void;
__expand: (x: number, y: number, width: number, height: number) => void;
}