UNPKG

libpgs

Version:

Renderer for graphical subtitles (PGS) in the browser.

46 lines (45 loc) 1.5 kB
/** * 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; }