import { ShapeGeometry, ShapeLine } from '../document-model/index.js'; import { ShapeGradient, StrokeStyle, VectorPath } from '../vector.js'; /** EMU per point: 1 inch = 914400 EMU = 72 pt, so 1 pt = 12700 EMU. */ export declare const EMU_PER_PT = 12700; /** Word's default left/right text-box inset (§20.1.2.1) — 0.1", in points. */ export declare const DEFAULT_INSET_LR_PT: number; /** Word's default top/bottom text-box inset (§20.1.2.1) — 0.05", in points. */ export declare const DEFAULT_INSET_TB_PT: number; /** * Build the vector path(s) for a shape's geometry, sized `widthPt`×`heightPt`. * Dispatches preset geometries to {@link presetPaths} (falling back to the * bounding rectangle for unknown presets) and custom geometries to * {@link customPaths}. * * @param geometry The shape geometry (preset or custom). * @param widthPt Box width in points. * @param heightPt Box height in points. * @returns The path(s) in the local y-up frame. */ export declare function buildShapePaths(geometry: ShapeGeometry, widthPt: number, heightPt: number): Array; /** * A gradient's solid approximation: the per-channel average of its stop colours * (EP16). Writers without gradient support (the plain PDF emitter) paint this. * * @param gradient The gradient fill. * @returns The averaged colour as uppercase RRGGBB (`'000000'` if no valid stops). */ export declare function gradientToSolid(gradient: ShapeGradient): string; /** * An SVG `` / `` definition for a gradient fill * (EP16), shared by the SVG and HTML writers. The linear vector is expressed in * `objectBoundingBox` space; the angle is negated because the shape's own path * transform flips y (local y-up → page y-down). * * @param id The gradient element id (referenced by `fill="url(#id)"`). * @param g The gradient fill. * @returns The `` or `` markup. */ export declare function gradientSvgDef(id: string, g: ShapeGradient): string; /** * §20.1.8.24 / §20.1.8.42 — the arrowheads a line asks for at its ends, as * filled paths in the same local frame as the shape's own geometry. The head * rides the first point of the first subpath and the tail the last point of * the last one, each turned along the segment that reaches it. * * @param paths The shape's geometry paths. * @param line The parsed line (its `headEnd`/`tailEnd` are read). * @param strokeWidthPt The pen width the decorations are sized against. * @returns The decoration paths (empty when the line asks for none). */ export declare function lineEndPaths(paths: ReadonlyArray, line: ShapeLine | undefined, strokeWidthPt: number): Array; /** * Build a {@link StrokeStyle} from a shape's `a:ln` line, resolving the default * width (0.75pt), dash pattern and line cap. Returns `undefined` for no line or * an explicit no-fill stroke. * * @param line The parsed line, or `undefined`. * @returns The stroke style, or `undefined` when nothing should be stroked. */ export declare function buildStroke(line: ShapeLine | undefined): StrokeStyle | undefined; /** * Build the 2×3 affine placement matrix `[a, b, c, d, e, f]` that positions a * shape's local y-up box at `(pageX, pageY)`, applying rotation and h/v flips * about the box centre. DrawingML `rot` is clockwise in y-down space ⇒ a * negative angle in PDF y-up. * * @param pageX Box left, in page points. * @param pageY Box bottom, in page points. * @param widthPt Box width in points. * @param heightPt Box height in points. * @param rotation60k Rotation in 1/60000°, clockwise. * @param flipH Mirror horizontally. * @param flipV Mirror vertically. * @returns The affine matrix as `[a, b, c, d, e, f]`. */ export declare function buildShapeTransform(pageX: number, pageY: number, widthPt: number, heightPt: number, rotation60k: number, flipH: boolean, flipV: boolean): [number, number, number, number, number, number];