import { ImageViewerPluginBase, PluginType } from "../ImageViewer/Core/ImageViewerPluginBase"; import { ImageFormatCode } from "../ImageViewer/Models/Types"; export declare function mirrorImage(ctx: CanvasRenderingContext2D, image: HTMLImageElement, x?: number, y?: number, horizontal?: boolean, vertical?: boolean): void; /** * RotationPlugin options. **/ export declare type RotationPluginOptions = { /** * "Rotate image" button position. * Set the rotatePosition option to -1 or false if you don't wish to show "Rotate image" button. * @default 1 **/ rotatePosition: number | false; /** * "Flip horizontal" button position. * Set the flipHorizontalPosition option to -1 or false if you don't wish to show "Flip horizontal" button. * @default 2 **/ flipHorizontalPosition: number | false; /** * "Flip vertical" button position. * Set the flipVerticalPosition option to -1 or false if you don't wish to show "Flip vertical" button. * @default 3 **/ flipVerticalPosition: number | false; }; /** * RotationPlugin class. * Adds the "Rotate Image" button. * @deprecated Deprecated in favor of PageToolsPlugin. * @description * Available options are: * * rotatePosition - position of the "Rotate Image" button. * * flipHorizontalPosition - position of the "Flip horizontal" button. * * flipVerticalPosition - position of the "Flip vertical" button. * @example * ```javascript * * * * ``` * @param {any} options **/ export declare class RotationPlugin extends ImageViewerPluginBase { /** * Unique plugin identifier. **/ readonly id: PluginType; /** * Plugin options **/ options: RotationPluginOptions; private _rotation; private _originalNaturalSize; /** * RotationPlugin constructor. * @param options */ constructor(options?: RotationPluginOptions); initialize(viewer: any): void; dispose(): void; /** * Specifies the rotation in degrees. **/ getRotation(): number; rotate(val: number): Promise; /** * Specifies the rotation in degrees. **/ setRotation(val: number): Promise; /** * Checks if the image format specified by the imageFormat parameter is supported. * @param imageFormat **/ isImageFormatSupported(imageFormat: ImageFormatCode | string): boolean; /** * Flip image. **/ flip(horizontal?: boolean, vertical?: boolean): Promise; /** * Flip image horizontally. **/ flipHorizontal(): Promise; /** * Flip image vertically. **/ flipVertical(): Promise; private _removeRotateButtonFromLayout; private _onBeforeOpen; /** * Rotate image data action. **/ private _rotateImageData; private _imageSizeAfterRotation; private _ensureOptions; }