|
@@ -13,13 +13,6 @@ export interface Dimensions {
|
|
|
height: number;
|
|
|
}
|
|
|
|
|
|
-export interface IBoundingBox {
|
|
|
- left: number;
|
|
|
- top: number;
|
|
|
- right: number;
|
|
|
- bottom: number;
|
|
|
-}
|
|
|
-
|
|
|
export interface IRect {
|
|
|
x: number;
|
|
|
y: number;
|
|
@@ -27,20 +20,6 @@ export interface IRect {
|
|
|
height: number;
|
|
|
}
|
|
|
|
|
|
-export const boxFromBoundingBox = ({
|
|
|
- left,
|
|
|
- top,
|
|
|
- right,
|
|
|
- bottom,
|
|
|
-}: IBoundingBox) => {
|
|
|
- return new Box({
|
|
|
- x: left,
|
|
|
- y: top,
|
|
|
- width: right - left,
|
|
|
- height: bottom - top,
|
|
|
- });
|
|
|
-};
|
|
|
-
|
|
|
export class Box implements IRect {
|
|
|
public x: number;
|
|
|
public y: number;
|