Trim
This commit is contained in:
parent
bfc81b1ab6
commit
faf415277e
1 changed files with 0 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue