mirror of
https://github.com/zoriya/libpgs-js.git
synced 2026-08-27 00:00:51 +00:00
Not for upstream: this branch only exists so a consumer can depend on the fork straight from git while the `ready` promise waits on a release.
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
/**
|
|
* A simple rectangular class.
|
|
*/
|
|
export declare class Rect {
|
|
/**
|
|
* Gets if the rect is still empty and doesn't contain any area.
|
|
*/
|
|
empty: boolean;
|
|
/**
|
|
* Gets the x coordinate of the rectangular area if not empty.
|
|
*/
|
|
x: number;
|
|
/**
|
|
* Gets the y coordinate of the rectangular area if not empty.
|
|
*/
|
|
y: number;
|
|
/**
|
|
* Gets the width of the rectangular area if not empty.
|
|
*/
|
|
width: number;
|
|
/**
|
|
* Gets the height of the rectangular area if not empty.
|
|
*/
|
|
height: number;
|
|
/**
|
|
* Clears the rectangular.
|
|
*/
|
|
reset(): void;
|
|
/**
|
|
* Grows this rectangular area to include the given area.
|
|
* @param x The x coordinate of the new area.
|
|
* @param y The y coordinate of the new area.
|
|
* @param width The width of the new area. Negative values are not supported.
|
|
* @param height The height of the new area. Negative values are not supported.
|
|
*/
|
|
set(x: number, y: number, width?: number, height?: number): void;
|
|
/**
|
|
* Grows this rectangular area to include the given area.
|
|
* @param x The x coordinate of the new area to include.
|
|
* @param y The y coordinate of the new area to include.
|
|
* @param width The width of the new area to include. Negative values are not supported.
|
|
* @param height The height of the new area to include. Negative values are not supported.
|
|
*/
|
|
union(x: number, y: number, width?: number, height?: number): void;
|
|
}
|