/** Pan/zoom transform: content is scaled by `scale` then translated by (x, y). */ export interface ViewportTransform { scale: number; x: number; y: number; } export interface Size { width: number; height: number; } export interface Point { x: number; y: number; } export declare function clampScale(scale: number, min: number, max: number): number; /** * Zooms by `factor` about a fixed screen `pivot` so the content point under the * pivot stays put. Scale is clamped to [min, max]; the translation is adjusted * by the *effective* factor after clamping so panning can't drift at the limits. */ export declare function zoomAt(view: ViewportTransform, factor: number, pivot: Point, min: number, max: number): ViewportTransform; /** * Centers `content` within `viewport` at the largest scale that fits inside the * given padding (clamped to [min, max]). Use this for a "fit / reset" control. */ export declare function fitToBounds(content: Size, viewport: Size, padding: number, min: number, max: number): ViewportTransform; /** Converts a screen point inside the viewport to content coordinates. */ export declare function screenToContent(view: ViewportTransform, screen: Point): Point;