/** * DOCX Module - Unit Conversion Utilities * * Conversion functions between common measurement units used in OOXML. */ /** Twips per inch (OOXML page measurements). */ export declare const TWIPS_PER_INCH = 1440; /** Twips per point. */ export declare const TWIPS_PER_POINT = 20; /** * Twips per centimeter, derived exactly from 1 inch = 2.54 cm = 1440 twips * (= 566.9291…). Using the exact factor — rather than the rounded 567 — keeps * metric page sizes aligned with their canonical twip values, e.g. * `cmToTwips(21)` → 11906 and `cmToTwips(29.7)` → 16838 (A4), matching * `A4_PAGE_WIDTH` / `A4_PAGE_HEIGHT` in constants.ts. */ export declare const TWIPS_PER_CM: number; /** Twips per millimeter, derived exactly from {@link TWIPS_PER_CM}. */ export declare const TWIPS_PER_MM: number; /** EMU (English Metric Units) per inch — DrawingML coordinate space. */ export declare const EMU_PER_INCH = 914400; /** EMU per centimeter. */ export declare const EMU_PER_CM = 360000; /** EMU per point. */ export declare const EMU_PER_POINT = 12700; /** EMU per pixel at 96 DPI (CSS pixel). */ export declare const EMU_PER_PX = 9525; /** Default chart width in EMU (6 inches). */ export declare const DEFAULT_CHART_WIDTH_EMU: number; /** Default chart height in EMU (3.5 inches for c:chart). */ export declare const DEFAULT_CHART_HEIGHT_EMU: number; /** Default ChartEx height in EMU (4 inches). */ export declare const DEFAULT_CHART_EX_HEIGHT_EMU: number; /** Default wrap margin for inline drawings in EMU (≈0.125 inch). */ export declare const DEFAULT_WRAP_MARGIN_EMU = 114300; /** Default `wp:anchor` `relativeHeight` (z-order) when not specified. */ export declare const DEFAULT_RELATIVE_HEIGHT = 251658240; /** Convert inches to twips. */ export declare function inchesToTwips(inches: number): number; /** Convert twips to inches. */ export declare function twipsToInches(twips: number): number; /** Convert centimeters to twips. */ export declare function cmToTwips(cm: number): number; /** Convert twips to centimeters. */ export declare function twipsToCm(twips: number): number; /** Convert points to twips. */ export declare function ptToTwips(pt: number): number; /** Convert twips to points. */ export declare function twipsToPt(twips: number): number; /** Convert millimeters to twips. */ export declare function mmToTwips(mm: number): number; /** Convert inches to EMU. */ export declare function inchesToEmu(inches: number): number; /** Convert EMU to inches. */ export declare function emuToInches(emu: number): number; /** Convert centimeters to EMU. */ export declare function cmToEmu(cm: number): number; /** Convert EMU to centimeters. */ export declare function emuToCm(emu: number): number; /** Convert points to EMU. */ export declare function ptToEmu(pt: number): number; /** Convert pixels (at 96 DPI) to EMU. */ export declare function pxToEmu(px: number): number; /** Convert EMU to pixels (at 96 DPI). */ export declare function emuToPx(emu: number): number; /** Convert points to half-points (for w:sz). */ export declare function ptToHalfPoint(pt: number): number; /** Convert half-points to points. */ export declare function halfPointToPt(hp: number): number; /** Convert points to eighth-points (for border w:sz). */ export declare function ptToEighthPoint(pt: number): number; /** Convert eighth-points to points. */ export declare function eighthPointToPt(ep: number): number; /** Convert line multiplier to line spacing value (auto mode). */ export declare function lineMultiplierToSpacing(multiplier: number): number; /** Convert line spacing value to multiplier (auto mode). */ export declare function spacingToLineMultiplier(spacing: number): number; /** Convert percentage (0-100) to table width pct value. */ export declare function percentToTablePct(percent: number): number; /** Convert table width pct value to percentage. */ export declare function tablePctToPercent(pct: number): number;