import type { DocumentMatrix } from './contracts.js'; export interface ImagePaintPlacement { scaleMode: 'fill' | 'fit' | 'crop' | 'tile'; scale?: number; /** Natural image pixels to layer-local pixels. Active in crop mode; resize keeps these coordinates. */ imageTransform?: DocumentMatrix; } export interface ImagePaintBox { width: number; height: number; } export interface ImagePaintGeometry { matrix: DocumentMatrix; pattern: ImagePaintBox; tiled: boolean; } export declare function isImageTransform(value: unknown): value is DocumentMatrix; /** One projection for box, vector, text and export; explicit crop matrices never resize the asset. */ export declare function imagePaintGeometry(paint: ImagePaintPlacement, asset: ImagePaintBox, box: ImagePaintBox): ImagePaintGeometry; /** A different asset starts from its mode default; selecting the same asset preserves the current crop. */ export declare function replaceImagePaintAsset(paint: T, assetId: string): T;