/// //@ts-ignore import React, { Component } from 'react'; import { PageToolsPlugin } from './PageToolsPlugin'; /// //@ts-ignore import { i18n } from 'i18next'; import { Bounds, IGcSelectionBox, SelectionBoundsChangedParams } from '../../ImageViewer/Models/SelectionBoxTypes'; /** * Crop dialog state model. **/ export declare type CropDialogState = { hidden?: boolean; x?: number | any; y?: number | any; width?: number | any; height?: number | any; aspectRatio?: AspectRatioType; }; /** * Crop dialog properties. **/ export declare type CropDialogProps = { pageToolsPlugin: PageToolsPlugin; in17n: i18n; hidden?: boolean; }; export declare type AspectRatioType = "Custom" | "Original" | "1_1" | "5_4" | "4_3" | "3_2" | "16_9"; /** * Crop dialog **/ export declare class CropDialog extends Component { static instances: { [id: string]: CropDialog | null; }; private _isMounted; constructor(props: any, context: any); get isMounted(): boolean; get selectionBox(): IGcSelectionBox; get viewer(): import("../..").IImageViewer; /** * The maximum canvas area size in pixels. * @ignore exclude from docs. **/ get maxImageSize(): { width: number; height: number; }; /** * Max possible crop width. **/ get maxWidth(): number; /** * Max possible crop height. **/ get maxHeight(): number; /** * Crop x position. **/ getX(): number; setX(x: number, checkBounds?: boolean): void; /** * Crop y position. **/ getY(): number; setY(y: number, checkBounds?: boolean): void; /** * Crop width. **/ getWidth(): number; set width(width: number | string); /** * Crop height. **/ getHeight(): number; set height(height: number); adjustAspectRatio(changedSide?: "height" | "width"): boolean; /** * Natural aspect ratio. **/ get naturalRatio(): number; /** * Show dialog. * @param pageToolsPlugin */ static showDialog(pageToolsPlugin: PageToolsPlugin): void; /** * Show dialog. **/ show(): void; resetValues(): void; disableModal(): void; /** * Hide dialog **/ hide(): void; onSelectionBoundsChanged(selection: Bounds, params: SelectionBoundsChangedParams): void; onKeyDown(event: KeyboardEvent): void; showSelectionBox(): void; updateSelectionBox(): void; hideSelectionBox(): void; componentWillUnmount(): void; componentDidMount(): void; render(): React.JSX.Element | null; }