/** * Low-level PDF graphics operator helpers shared between the main * renderer and the widget appearance builders. * * Extracted from `pdf-renderer.ts` during M4 so that * `src/phases/phase6-widgets.ts` can build form-widget appearance * streams without importing values from `pdf-renderer.ts` (which would * create a load-time cycle now that pdf-renderer imports widget * builders from phase6-widgets). */ import type { PdfColor } from "./phase4-types.js"; import { PDFArray } from "./pdf-objects.js"; /** * State threaded through the renderer when emitting PDF/A output. * * `colorSpaceArray` is the `/CS0` indirect ICC-based color space the * renderer uses to satisfy PDF/A's "all colors must reference an ICC * profile" rule. The other fields are present so individual draw * operators can decide whether to emit color in normalized RGB * (PDF/A) or pass through the document-supplied color space. */ export interface PreparedPdfaState { colorSpaceArray: PDFArray; iccProfileBuffer: Buffer; outputConditionIdentifier: string; } export declare function validateColorComponent(value: number, label: string): number; export declare function colorComponents(color: PdfColor): number[]; export declare function colorToRgb(color: PdfColor): { b: number; g: number; r: number; space: "rgb"; }; export declare function buildColorOperators(color: PdfColor, mode: "fill" | "stroke", pdfa?: PreparedPdfaState): string[]; export declare function buildRectPath(x: number, y: number, width: number, height: number): string; export declare function buildRoundedRectPath(x: number, y: number, width: number, height: number, radius: number): string; //# sourceMappingURL=pdf-graphics-ops.d.ts.map