import type { Shape, Connector, Fill, ColorMap, ColorScheme, FontScheme, StyleMatrix, Slide } from "../model/types.js"; import type { StyleBuilder } from "./style-builder.js"; export declare const PDF_PADDING = 20; export declare const SUPPORTED_GEOMETRIES: Set; export interface ShapeMapperContext { colorMap: ColorMap; colorScheme: ColorScheme; fontScheme: FontScheme; styleMatrix?: StyleMatrix; slide?: Slide; } export declare function mapShape(shape: Shape, styles: StyleBuilder, attachments: Map, ctx: ShapeMapperContext): string; /** * Generate PDF path drawing commands for a shape. * pad = uniform offset from (0,0) where the shape starts in screen coords. * totalH = total height of the coordinate space (needed for Y-flipping). * For standalone shapes: pad=PDF_PADDING, totalH=h+2*pad. * For group children: pad=0, totalH=h (shape draws at origin, caller uses cm to translate). */ export declare function getShapeDrawCmd(pad: number, w: number, h: number, totalH: number, preset: string, adjustValues?: Record): string; /** Wrap a PDF content stream into a minimal PDF 1.4 document. */ export declare function buildPdf(totalW: number, totalH: number, stream: string): Buffer; export declare function mapConnector(conn: Connector, attachments: Map, ctx: ShapeMapperContext): string; /** * Compute the inscribed text frame for a geometry preset (shapeTextBoxRect in OfficeImport). * OfficeImport computes inset using float px values for radius, then truncates dimensions. * Input/output in EMU, but computation happens in pixel space to match QL's rounding. */ export declare function shapeTextBox(bounds: { x: number; y: number; cx: number; cy: number; }, preset: string, adjustValues?: Record): { x: number; y: number; cx: number; cy: number; }; /** Returns just the color string (for PDF fill, which only needs a single color) */ export declare function fillToColor(fill: Fill | undefined, ctx: ShapeMapperContext): string | null;