UNPKG

@mescius/dsimageviewer

Version:

Document Solutions Image Viewer

31 lines (30 loc) 1.25 kB
import { ImageFormatCode } from "../ImageViewer/Models/Types"; export declare function mirrorImage(ctx: CanvasRenderingContext2D, image: HTMLImageElement, x?: number, y?: number, horizontal?: boolean, vertical?: boolean): void; export declare type RotationPluginOptions = { rotatePosition: number | false; flipHorizontalPosition: number | false; flipVerticalPosition: number | false; }; export declare class RotationPlugin { readonly id: string; options: RotationPluginOptions; private _initialized; private _rotation; private _originalNaturalSize; private _viewer; constructor(options?: RotationPluginOptions); initialize(viewer: any): void; dispose(): void; getRotation(): number; rotate(val: number): Promise<boolean>; setRotation(val: number): Promise<boolean>; isImageFormatSupported(imageFormat: ImageFormatCode | string): boolean; flip(horizontal?: boolean, vertical?: boolean): Promise<boolean>; flipHorizontal(): Promise<boolean>; flipVertical(): Promise<boolean>; private _removeRotateButtonFromLayout; private _onBeforeOpen; private _rotateImageData; private _imageSizeAfterRotation; private _ensureOptions; }