export interface Point { x: number; y: number; } /** This works a lot like the CSS `transform: matrix(a, c, b, d, tx, ty)` syntax. Returns a new Point object. */ export declare function transformPoint(point: Point, a: number, c: number, b: number, d: number, tx?: number, ty?: number): Point; export interface Size { width: number; height: number; } export interface Rectangle { minX: number; minY: number; maxX: number; maxY: number; } export declare function makeRectangle(minX: number, minY: number, maxX: number, maxY: number): Rectangle; /** Measure the distance from this Rectangle to a different Rectangle, using the nearest two corners. If there is any overlap in either the x-axis or y-axis (including if two sides are exactly adjacent), it will return 0 for that component. However, there is only true overlap if both components are 0. Returns a tuple: [x_axis_distance, y_axis_distance] */ export declare function distanceToRectangle(from: Rectangle, to: Rectangle): [number, number]; /** Find the Rectangle that contains both {source} and {target}. */ export declare function boundingRectangle(...rectangles: Rectangle[]): Rectangle; export declare const emptyRectangle: Rectangle; export declare function formatRectangle({ minX, minY, maxX, maxY }: Rectangle, digits?: number): string; /** Returns true if {source} fully contains {target}. The calculation is inclusive; i.e., source.containsRectangle(source) === true */ export declare function containsRectangle(source: Rectangle, target: Rectangle): boolean; export interface Container extends Rectangle { elements: T[]; } /** Add the given {elements} to the container's elements, creating a new container with its bounds extended to contain the new elements if needed. TODO: optimize this by using PointArray (plain `push()` incurs a lot of function calls). */ export declare function addElements(container: Container, ...newElements: T[]): Container; /** Combine the elements of {target} and {source} (target ++ source) and expand the bounds to contain both. It's more efficient than addElements(target, source.elements), since source already knows its bounding box. */ export declare function mergeContainer(target: Container, source: Container): Container; export declare function makeContainer(): Container; /** > Because a transformation matrix has only six elements that can be changed, in most cases in PDF it shall be specified as the six-element array [a b c d e f]. ⎡ a b 0 ⎤ [a b c d e f] => ⎢ c d 0 ⎥ ⎣ e f 1 ⎦ */ export declare type Mat3 = [number, number, number, number, number, number, number, number, number]; /** Multiply two 3x3 matrices, returning a new 3x3 matrix representation. See 8.3.4 for a shortcut for avoiding full matrix multiplications. */ export declare function mat3mul(A: Mat3, B: Mat3): Mat3; /** Add two 3x3 matrices, returning a new 3x3 matrix representation. */ export declare function mat3add(A: Mat3, B: Mat3): Mat3; export declare const mat3ident: Mat3;