/** A screen rectangle: left, top, right, bottom. */ export interface Box { x0: number; y0: number; x1: number; y1: number; } export type Point = [number, number]; export declare const inside: (box: Box, x: number, y: number) => boolean; /** The part of a rectangle inside the box, or nothing when they do not overlap. */ export declare function clipRect(box: Box, x: number, y: number, width: number, height: number): [number, number, number, number] | undefined; /** The pieces of a line that lie inside the box. A line that leaves and comes back is cut in two. */ export declare function clipLine(box: Box, points: Point[]): Point[][]; /** The part of a closed outline inside the box, by clipping against each side in turn (Sutherland–Hodgman). */ export declare function clipPolygon(box: Box, points: Point[]): Point[];