/** * @superdoc/engines-image-wrap contract * * Computes text wrapping exclusions for anchored images. * Handles both rectangular (Square/TopAndBottom) and polygon-based (Tight/Through) wrapping. */ export interface WrapStyle { type: 'None' | 'Square' | 'Tight' | 'Through' | 'TopAndBottom'; wrapText?: 'bothSides' | 'left' | 'right' | 'largest'; distTop?: number; distBottom?: number; distLeft?: number; distRight?: number; polygon?: number[][]; } export interface Rect { x: number; y: number; width: number; height: number; } /** * Scale an OOXML wrap polygon to absolute page coordinates. * * OOXML polygons are expressed in EMUs relative to the image's native size. * This function scales them to match the rendered image dimensions and position. * * @param ooxml - Array of [x, y] coordinate pairs from OOXML (in EMUs, 0-based) * @param imageRect - Rendered image rectangle in pt * @returns Scaled polygon in absolute page coordinates (pt) */ export declare function scaleWrapPolygon(ooxml: number[][], imageRect: Rect): number[][]; /** * Compute horizontal exclusion range for a line intersecting a wrapped image. * * For rectangular wrapping (Square/TopAndBottom): * - Returns the image bounds + padding distances * * For polygon wrapping (Tight/Through): * - Samples the polygon at the given Y coordinate * - Returns the horizontal range occupied by the polygon at that height * * @param image - Image rectangle and wrap style * @param lineY - Top Y coordinate of the text line (pt) * @param lineHeight - Height of the text line (pt) * @returns Exclusion range (left/right in pt), or null if no intersection */ export declare function computeWrapExclusion(image: { rect: Rect; wrap: WrapStyle; }, lineY: number, lineHeight: number): { left: number; right: number; } | null; //# sourceMappingURL=image-wrap.d.ts.map