import { fabric } from "fabric"; import type { Bounds } from "../types"; /** * Create overlay rectangles for crop mode * Creates 4 rectangles to darken the area outside the image bounds */ export declare function createCropOverlays(canvasWidth: number, canvasHeight: number, imgBounds: Bounds): fabric.Rect[]; /** * Create crop rectangle with visual styling */ export declare function createCropRect(imgBounds: Bounds): fabric.Rect; /** * Create dimension label for crop rect */ export declare function createCropLabel(rect: fabric.Rect): fabric.Textbox; /** * Update crop label text and position */ export declare function updateCropLabel(label: fabric.Textbox, rect: fabric.Rect): { width: number; height: number; }; /** * Constrain crop rect to stay inside image bounds */ export declare function constrainCropRectInside(rect: fabric.Rect, imgBounds: Bounds): void; /** * Limit crop rect scale to available space */ export declare function limitCropRectScale(rect: fabric.Rect, imgBounds: Bounds): void; /** * Calculate crop coordinates in image pixel space */ export declare function calculateCropCoordinates(cropRect: fabric.Rect, image: fabric.Image, viewportTransform: number[]): { x: number; y: number; width: number; height: number; };