advanced-cropper
Version:
The core of the advanced cropper libraries family
27 lines (26 loc) • 1.27 kB
TypeScript
import { Coordinates, CropperImage, CropperState, CropperTransitions, Size, Transforms } from "../types/index";
declare function getStyleTransforms(transforms: Partial<Transforms> & {
scale?: number;
}): string;
interface LoadImageSettings {
crossOrigin?: string | boolean;
checkOrientation?: boolean;
parse?: boolean;
}
interface CreateImageSettings {
crossOrigin?: string | boolean;
}
declare function createImage(src: string, settings?: CreateImageSettings): Promise<HTMLImageElement>;
declare function loadImage(src: string, settings?: LoadImageSettings): Promise<CropperImage>;
declare function getImageStyle(image: CropperImage, state: CropperState, area: Coordinates, coefficient: number, transitions?: CropperTransitions | null): {
width: string;
height: string;
left: string;
top: string;
transition: string;
transform: string;
willChange: string;
};
declare function getBackgroundStyle(image: CropperImage, state: CropperState, transitions?: CropperTransitions | null): {};
declare function getPreviewStyle(image: CropperImage, state: CropperState, size: Size, transitions?: CropperTransitions | null): {};
export { getStyleTransforms, createImage, loadImage, getImageStyle, getBackgroundStyle, getPreviewStyle };