Constructors
constructor
-
Parameters
-
-
Default value allowNegativeDimensions: boolean = false
Returns Box
Accessors
area
-
Returns number
bottom
-
Returns number
height
-
Returns number
left
-
Returns number
right
-
Returns number
top
-
Returns number
width
-
Returns number
x
-
Returns number
y
-
Returns number
Methods
calibrate
- calibrate(region: Box): Box<any>
-
Parameters
Returns Box<any>
clipAtImageBorders
- clipAtImageBorders(imgWidth: number, imgHeight: number): Box<BoxType>
-
Parameters
-
imgWidth: number
-
imgHeight: number
Returns Box<BoxType>
floor
-
Returns Box<BoxType>
pad
- pad(padX: number, padY: number): Box<BoxType>
-
Parameters
-
padX: number
-
padY: number
Returns Box<BoxType>
padAtBorders
- padAtBorders(imageHeight: number, imageWidth: number): object
-
Parameters
-
imageHeight: number
-
imageWidth: number
Returns object
rescale
-
Parameters
Returns Box<BoxType>
round
-
Returns Box<BoxType>
shift
- shift(sx: number, sy: number): Box<BoxType>
-
Parameters
Returns Box<BoxType>
toSquare
-
Returns Box<BoxType>
Static assertIsValidBox
- assertIsValidBox(box: any, callee: string, allowNegativeDimensions?: boolean): void
-
Parameters
-
box: any
-
callee: string
-
Default value allowNegativeDimensions: boolean = false
Returns void
Static isRect
- isRect(rect: any): boolean
-
Parameters
Returns boolean