@syncfusion/ej2-pdfviewer
Version:
Essential JS 2 PDF viewer Component
136 lines (135 loc) • 3.36 kB
TypeScript
import { PointModel } from './point-model';
/**
* @hidden
* Rect defines and processes rectangular regions
*/
export declare class Rect {
/**
* Sets the x-coordinate of the starting point of a rectangular region
*
* @default 0
*/
x: number;
/**
* Sets the y-coordinate of the starting point of a rectangular region
*
* @default 0
*/
y: number;
/**
* Sets the width of a rectangular region
*
* @default 0
*/
width: number;
/**
* Sets the height of a rectangular region
*
* @default 0
*/
height: number;
constructor(x?: number, y?: number, width?: number, height?: number);
/** @private */
static empty: Rect;
/** @private */
readonly left: number;
/** @private */
readonly right: number;
/** @private */
readonly top: number;
/** @private */
readonly bottom: number;
/** @private */
readonly topLeft: PointModel;
/** @private */
readonly topRight: PointModel;
/** @private */
readonly bottomLeft: PointModel;
/** @private */
readonly bottomRight: PointModel;
/** @private */
readonly middleLeft: PointModel;
/** @private */
readonly middleRight: PointModel;
/** @private */
readonly topCenter: PointModel;
/** @private */
readonly bottomCenter: PointModel;
/** @private */
readonly center: PointModel;
/**
* @param {PointModel} rect1 - rect1
* @param {number} rect2 - rect2
* @private
* @returns {boolean} - boolean
*/
equals(rect1: Rect, rect2: Rect): boolean;
/**
* @param {PointModel} rect - rect
* @private
* @returns {Rect} - Rect
*/
uniteRect(rect: Rect): Rect;
/**
* @param {PointModel} point - point
* @private
* @returns {void} - void
*/
unitePoint(point: PointModel): void;
/**
* @param {Rect} rect - rect
* @private
* @returns {Rect} - Rect
*/
intersection(rect: Rect): Rect;
/**
* @param {number} padding - padding
* @private
* @returns {Rect} - Rect
*/
Inflate(padding: number): Rect;
/**
* @param {Rect} rect - rect
* @private
* @returns {boolean} - boolean
*/
intersects(rect: Rect): boolean;
/**
* @param {Rect} rect - rect
* @private
* @returns {boolean} - boolean
*/
containsRect(rect: Rect): boolean;
/**
* @param {PointModel} point - point
* @param {PointModel} padding - padding
* @private
* @returns {boolean} - boolean
*/
containsPoint(point: PointModel, padding?: number): boolean;
/**
* @private
* @returns {PointModel[]} - PointModel[]
*/
toPoints(): PointModel[];
/**
* @param {PointModel[]} points - points
* @private
* @returns {Rect} - Rect
*/
static toBounds(points: PointModel[]): Rect;
/**
* @param {number} scaleX - scaleX
* @param {number} scaleY - scaleY
* @private
* @returns {void} - void
*/
scale(scaleX: number, scaleY: number): void;
/**
* @param {number} offsetX - offsetX
* @param {number} offsetY - offsetY
* @private
* @returns {void} - void
*/
offset(offsetX: number, offsetY: number): void;
}