export declare enum ImageEditorMaskStyle { Rect = 1, Circle = 2 } export interface ImageEditorOption { container: HTMLElement; /**截图框的形状 */ style: ImageEditorMaskStyle; /**截图框的宽占容器宽度的比例,如:50 */ percent: any; /**输出图像的width */ outputWidthPixel: number; /**输出图像的height */ outputHeightPixel: number; /**支持旋转,默认true */ supportRotate?: boolean; } export declare class ImageEditor { container: HTMLElement; private divEle; private canvas; private image; private controlingEvent; private angle; private printScale; private canvasWidth; private canvasHeight; private offset; private scale; private hammer; constructor(option: ImageEditorOption); private option; private setMaskStyle; private static dataURLtoBlob; /** * 压缩图片 * @param file * @param targetWidth 压缩后分辨率 */ static compressImage(file: File, targetWidth: number): Promise; getOutputBlob(): Blob; getOutputBase64(): string; private _originalOffset; private _originalRotate; private onRotateStart; private onRotateMove; private onRotateEnd; /** * 获取旋转后坐标 * @param rx * @param ry * @param dx * @param dy * @param angle 顺时针角度 */ private rotationTransform; vRotationTransform(dX: any, dY: any, dAngle: any): { x: number; y: number; }; private onPanstart; private onPan; private onPinch; loadImageByUrl(url: string, scale?: any, offset?: any): Promise; loadImage(input: HTMLInputElement): Promise; private loadImageBySrc; loadImageByImage(image: HTMLImageElement): Promise; loadImageByBlob(blob: Blob): Promise; loadImageByBase64(base64: string): Promise; private print; dispose(): void; }