export interface BoundedCanvasAllocationInput{readonly cssWidth:unknown;readonly cssHeight:unknown;readonly desiredScale:unknown;readonly maxDimension:number;readonly maxPixels:number;}export interface BoundedCanvasAllocation{readonly cssWidth:number;readonly cssHeight:number;readonly pixelWidth:number;readonly pixelHeight:number; /** Uniform requested scale after applying the dimension and pixel-area limits. */ readonly scale:number; /** Exact horizontal backing-store scale after integer pixel rounding. */ readonly scaleX:number; /** Exact vertical backing-store scale after integer pixel rounding. */ readonly scaleY:number;} /** * Resolves a bounded canvas backing-store allocation without allocating a canvas. * * The requested scale is reduced uniformly so neither backing dimension nor total pixel count can * exceed the supplied limits. Integer rounding can make the two effective axis scales differ * slightly, so callers receive both exact values for `CanvasRenderingContext2D.scale()`. */ export declare function resolveBoundedCanvasAllocation(input:Readonly):Readonly; /** A memoized, detached canvas 2D context shared by any component that needs * offscreen canvas measurement/normalization (e.g. measuring rendered text * width for layout, or normalizing a CSS color string) without allocating * its own canvas per call. Created lazily on first use and cached per * `Document`, so an element adopted into another browsing context never * keeps parsing colors or measuring text through its former realm. Returns * `null` when there is no document or canvas 2D isn't available. */ export declare function getScratchCtx(ownerDocument?:Document|null):CanvasRenderingContext2D|null;