import { BoundingBoxConfig, BoundingBoxInput } from '../types'; /** * Full-frame identity bounding box. A box with these values covers the whole viewport, * which renders the same as having no box at all. */ export declare const DEFAULT_BOUNDING_BOX: BoundingBoxConfig; /** * Merges a user-supplied (possibly partial) bounding box with the full-frame defaults so the * renderer always receives a complete BoundingBoxConfig — the GPU path dereferences every * dimension (`bbox.x.unit`, …) and would crash on a partial object. Lengths may be authored in * any accepted form (see toBoxDimension) and are normalized to their object form here, so every * reader downstream sees `{ value, unit }`. Returns undefined when no box is given: absence keeps * the bounding-box render path disabled entirely, so a merged default is never forced onto layers * that don't use one. */ export declare function resolveBoundingBox(bbox?: BoundingBoxInput | null): BoundingBoxConfig | undefined; /** * A box length as a fraction of the canvas on its axis (x / width → width, y / height → height). * `uv` already is that fraction; every other unit converts through CSS pixels, with `%` measuring * the containing box on the same axis (the canvas, until frames exist). Accepts the authored forms * too (bare number = px) so a caller that skipped resolveBoundingBox still reads correctly. */ export declare function boxLengthUV(d: unknown, axis: 'x' | 'y', canvasWidth: number, canvasHeight: number): number; /** * The clip window's corner radius in canvas-height UV. `uv` is already that; every other length * converts through pixels. `%` isn't accepted yet: in CSS a % corner radius is per-axis * (elliptical), and this clip window only draws round corners — it falls back to square corners * until elliptical corners exist. */ export declare function boxCornerRadiusUV(d: unknown, canvasWidth: number, canvasHeight: number): number; /** Whether a box has a length that depends on the browser viewport or root font size. */ export declare function boundingBoxUsesViewportUnits(bbox?: Partial | null): boolean; /** * True when a box covers the whole frame with no rotation or corner rounding — i.e. it renders * identically to having no box at all. Such a box is a real cost: the clip mask, the resize-fit * UV mapping and (for a Group) a full RTT round-trip + resample are all emitted for an identity * transform. `boundingBox={{ origin: 'center' }}` merges to exactly this, so it is a common * shape to hit; both the composer and the renderer treat it as "no box". * * Only canvas-relative units count as identity: `uv`, and `%` / `cw` / `ch`, which are the same * fraction of the canvas written ×100 (offset 0, extent 100 on the matching axis). A px or * viewport-relative box that happens to equal the frame right now would flip in and out of * identity on every resize, and crossing that boundary is a recompile. * * Origin is irrelevant here: with x=0, y=0 and a full-frame size every origin resolves the box's * top-left to (0,0) (`resolveTopLeft` in kit/uvTransform). */ export declare function isIdentityBoundingBox(bbox?: Partial | null): boolean; //# sourceMappingURL=boundingBox.d.ts.map