import { PoNode } from '../../po-helpers.js'; import { DiagramData, DiagramPoint } from './data-model.js'; /** One box the engine laid out, in the diagram's own frame (EMU). */ export interface LaidNode { readonly point: DiagramPoint; readonly shapeType: string; /** The layout node's `styleLbl` — which run of colours the box takes. */ readonly styleLbl?: string; /** The box's place among its siblings, which is where in that run it is. */ readonly index: number; /** The point size the layout states for the box's text, when it states one. */ readonly fontSizePt?: number; /** Whether the `tx` algorithm asks for the text to be bulleted. */ readonly bulleted?: boolean; /** * §21.4.3.9 `dgm:shape@hideGeom` — the box reserves its room but its outline * is never drawn. The picture lists put an invisible spacer above each node. */ readonly hideGeom?: boolean; /** §21.4.3.2 `txAnchorVert` — where in its box the `tx` algorithm sits text. */ readonly anchor?: string; /** §21.4.3.2 `parTxLTRAlign` — how the layout ranges a node's own label. */ readonly align?: string; /** * §21.4.3.5 `dgm:shape@rot` — how far the box's geometry is turned, in * 60 000ths of a degree clockwise. The cycle-matrix layout builds its disc * out of one quarter-wedge stated four times at 0°, 90°, 180° and 270°. */ readonly rotation60k?: number; readonly x: number; readonly y: number; readonly cx: number; readonly cy: number; } /** * Lay a diagram out from its data and layout parts. * * @param layout The parsed `layout1.xml` tree. * @param data The parsed data part. * @param cx The frame's width in EMU, as the drawing states it. * @param cy The frame's height in EMU. * @returns The boxes to draw, or an empty list when the layout uses an * algorithm this slice does not run — the caller then reports the * diagram as a loss exactly as before. */ export declare function layoutDiagram(layout: ReadonlyArray, data: DiagramData, cx: number, cy: number): Array;