@briancullen/aws-textract-parser
Version:
Library for converting AWS Textract responses into a more usable structure.
42 lines (41 loc) • 1.21 kB
TypeScript
/**
* Class represting the position and shape of the recognised block.
*/
export declare class Geometry {
/**
* Provides the coordinates to an axis aligned box that encompasses the
* block this provides the coordinates for.
*/
readonly boundaryBox: BoundaryBox;
/**
* Provides a series of points that describe a polygon that accurately describes
* the position of the block this provides the coordinates for.
*/
readonly polygon: Polygon;
/** @ignore */
constructor(boundaryBox: BoundaryBox, polygon: Polygon);
}
/**
* Class that defines an axis aligned rectangular area on the processed document.
*/
export declare class BoundaryBox {
readonly top: number;
readonly left: number;
readonly width: number;
readonly height: number;
/** @ignore */
constructor(top: number, left: number, width: number, height: number);
}
/**
* Class that represents a point position on the processed document
*/
export declare class Point {
readonly x: number;
readonly y: number;
/** @ignore */
constructor(x: number, y: number);
}
/**
* Type alias used for an array of Point instances
*/
export declare type Polygon = Point[];