import type { Resource, ResourceSafeArea } from '../types.js'; /** The resource's safe area, clamped to the picture, or `undefined` when it * has none, it is not a picture, or the area covers the whole picture * (which leaves no freedom). */ export declare function resourceSafeArea(resource: Resource): ResourceSafeArea | undefined; /** Clamp a safe area to the unit square; `undefined` for a malformed one or * one that covers the whole picture. */ export declare function normalizeSafeArea(area: ResourceSafeArea | undefined): ResourceSafeArea | undefined; /** Body height range of a picture `bodyWidth` wide whose intrinsic size is * `iw` × `ih`: from its safe area's height (cropping top and bottom) to * its safe area's width (cropping the sides). */ export declare function safeAreaHeightRange(iw: number, ih: number, area: ResourceSafeArea, bodyWidth: number): { min: number; max: number; }; /** The part of the picture shown when a body `bodyWidth` wide is set * `bodyHeight` tall: the whole height with the sides cropped when the body * is taller than the picture's own ratio, the whole width with top and * bottom cropped when it is shorter. `undefined` when nothing is cropped. */ export declare function safeAreaSource(iw: number, ih: number, area: ResourceSafeArea, bodyWidth: number, bodyHeight: number): ResourceSafeArea | undefined; /** The box the whole picture covers when its `source` part fills * `x, y, w, h`: what a renderer draws, clipped to the body. */ export declare function uncroppedPictureBox(x: number, y: number, w: number, h: number, source: ResourceSafeArea): { x: number; y: number; width: number; height: number; }; //# sourceMappingURL=safeArea.d.ts.map