import { Matrix } from './Matrix'; import { Point } from './Point'; import { Segment } from './Segment'; import { Shape, ShapeTag } from './Shape'; /** * WARNING: Does not represent a rectangle. * Box represents the bounding box of a shape. You can think of it as an * axis-aligned rectangle. */ export declare class Box extends Shape { static EMPTY: Readonly; /** Abstract box that has no dimensions (xmin is Infinity, xmax is -Infinity, etc) */ static VOID: Readonly; /** Minimal x coordinate */ xmin: number; /** Minimal y coordinate */ ymin: number; /** Maximal x coordinate */ xmax: number; /** Maximal y coordinate */ ymax: number; constructor(xmin?: number, ymin?: number, xmax?: number, ymax?: number); /** * Return new cloned instance of box */ clone(): Box; get tag(): ShapeTag; get name(): string; /** * Return property box like all other shapes */ get box(): this; /** * Return center of the box */ get center(): Point; /** * Return the width of the box */ get width(): number; /** * Return the height of the box */ get height(): number; /** * Returns true if point is contained in box. */ contains(other: Point): boolean; /** * Returns true if intersected with other box */ intersect(otherBox: Box): boolean; /** * Returns new box merged with other box */ merge(otherBox: Box): Box; /** * Returns true if this box is equal to other box, false otherwise */ equalTo(otherBox: Box): boolean; /** * Transform box into array of points from low left corner in counterclockwise */ toPoints(): Point[]; /** * Transform box into array of segments from low left corner in counterclockwise */ toSegments(): Segment[]; /** * This method _will_ throw. Box rotation is not supported. */ rotate(_angle: number, _center?: Readonly): Box; /** * Return new box transformed using affine transformation matrix * New box is a bounding box of transformed corner points. */ transform(m?: Readonly): Readonly; /** * Property low need for interval tree interface */ get low(): Point; /** * Property high need for interval tree interface */ get high(): Point; /** * Property max returns the box itself ! */ get max(): Box; /** * Defines predicate "less than" between two boxes. Need for interval index */ lessThan(otherBox: Box): boolean; output(): Box; static comparableMax(a: Box, b: Box): Box; static comparableLessThan(a: Point, b: Point): boolean; } /** * Shortcut to create new box */ export declare const box: (xmin?: number, ymin?: number, xmax?: number, ymax?: number) => Box; //# sourceMappingURL=Box.d.ts.map