import { Matrix } from 'transformation-matrix'; import { TransformMatrix } from '../helpers.js'; import { Sprite } from '../controllers/sprites/Sprite.js'; /** * Shared geometry layer consumed by BOTH idml2svg (dev preview) and * idml2serial (Bluepic import). Both serializers are projections of the same * resolved layout — the transform math lives here once, not duplicated. */ /** Convert an IDML 6-tuple item transform into a transformation-matrix Matrix. */ export declare function itemTransform2Matrix(itemTransform?: TransformMatrix): Matrix; /** * The sprite's transform re-expressed in its parent page's coordinate frame — * identical to what idml2svg renders. A sprite's itemTransform is originated in * the page coordinate system (at 0,0), so we inverse the page matrix, apply the * sprite transform, then re-apply the page matrix. */ export declare function bakeSpriteMatrix(sprite: Sprite, pageMatrix: Matrix): Matrix; /** A 2D affine decomposed into the component form Bluepic's Transform uses. */ export type DecomposedTransform = { translateX: number; translateY: number; rotate: number; skewX: number; skewY: number; scaleX: number; scaleY: number; }; /** * Decompose a matrix into `T · R · skewX · S` — exactly the order * @bluepic/core composes an element transform (with transform-origin at 0,0). * Handles rotation, non-uniform scale, flips, and shear (folded into skewX). */ export declare function decomposeMatrix(m: Matrix): DecomposedTransform; //# sourceMappingURL=layout.d.ts.map