/** * Adapter that exposes a {@link PdfChartDrawingSurface} on top of a raw * {@link PdfContentStream}, letting the page-level exporter forward a chart's * vector drawing callback into the same stream that renders the spreadsheet * cells. * * Why this exists: the `chartToPdf` helper in `excel-bridge.ts` renders a * single chart onto a `PdfDocumentBuilder` page (which natively implements * the chart surface). For workbook-level `excelToPdf`, rendering happens via * `pdf-exporter.ts` + `PdfContentStream`, which predate the chart surface. * The adapter bridges the two worlds so a chart can be drawn at any * `(x, y, width, height)` rect on an already-populated page without * refactoring the exporter pipeline. * * All coordinates are PDF points with **bottom-left origin** — matching the * convention the chart renderer emits after its internal Y-flip (see * `translateScene` in `@excel/chart/chart-renderer.ts`). */ import type { PdfContentStream } from "../core/pdf-stream.js"; import type { FontManager } from "../font/font-manager.js"; import type { PdfChartDrawingSurface } from "../types.js"; /** * Build a {@link PdfChartDrawingSurface} that forwards to the given content * stream. The returned surface is stateful — callers should not mix it with * direct stream mutations for the duration of chart rendering. * * @param stream Content stream receiving the drawing operators. * @param fontManager Font manager used for text layout and Type3 fallback. * @param alphaValues Shared set that accumulates transparency values for * later `ExtGState` registration. The surface adds any * `color.a` values it observes to this set. */ export declare function createChartSurface(stream: PdfContentStream, fontManager: FontManager, alphaValues: Set): PdfChartDrawingSurface;