/** * Map a PDF point to a pixel in the analysis raster. * * The browser services build the densitometer / color-picker analysis raster * at a nominal `ANALYSIS_DPI`, but **downscale it** when a large-format page * (a big packaging dieline) would exceed `analysisPixelCap` — so the raster's * real resolution is `widthPx/widthPts` px-per-point, which on a capped page is * *less* than `ANALYSIS_DPI/72`. Sampling must use that actual ratio, not the * nominal DPI: with the nominal scale every point past the capped width maps * beyond `widthPx` and clamps to the raster's right/bottom edge — the white * margin — so the readout shows `#FFFFFF` · 0% CMYK · 0% TAC no matter where you * tap. Deriving the scale from the raster's own dimensions is exact whether or * not the cap fired (and is sub-pixel-accurate even when it didn't). * * PDF points use an origin at the lower-left; raster pixels use the upper-left, * hence the Y flip. The result is clamped into `[0, widthPx-1] × [0, heightPx-1]` * so an edge tap (or a degenerate zero-dimension raster) never indexes out of * bounds. */ export interface RasterDims { widthPts: number; heightPts: number; widthPx: number; heightPx: number; } /** Map a PDF point (origin lower-left) to an integer raster pixel (origin upper-left). */ export declare function pdfPointToRasterPx(pdfX: number, pdfY: number, r: RasterDims): [number, number]; //# sourceMappingURL=rasterCoords.d.ts.map