1 | import { PixelCrop, PercentCrop, Crop, Ords } from './types';
|
2 |
|
3 | export declare const defaultCrop: PixelCrop;
|
4 | export declare const clamp: (num: number, min: number, max: number) => number;
|
5 | export declare const cls: (...args: unknown[]) => string;
|
6 | export declare const areCropsEqual: (cropA: Partial<Crop>, cropB: Partial<Crop>) => boolean;
|
7 | export declare function makeAspectCrop(crop: Pick<PercentCrop, 'unit'> & Partial<Omit<PercentCrop, 'unit'>>, aspect: number, containerWidth: number, containerHeight: number): PercentCrop;
|
8 | export declare function makeAspectCrop(crop: Pick<PixelCrop, 'unit'> & Partial<Omit<PixelCrop, 'unit'>>, aspect: number, containerWidth: number, containerHeight: number): PixelCrop;
|
9 | export declare function centerCrop(crop: Pick<PercentCrop, 'unit'> & Partial<Omit<PercentCrop, 'unit'>>, containerWidth: number, containerHeight: number): PercentCrop;
|
10 | export declare function centerCrop(crop: Pick<PixelCrop, 'unit'> & Partial<Omit<PixelCrop, 'unit'>>, containerWidth: number, containerHeight: number): PixelCrop;
|
11 | export declare function convertToPercentCrop(crop: Partial<Crop>, containerWidth: number, containerHeight: number): PercentCrop;
|
12 | export declare function convertToPixelCrop(crop: Partial<Crop>, containerWidth: number, containerHeight: number): PixelCrop;
|
13 | export declare function containCrop(pixelCrop: PixelCrop, aspect: number, ord: Ords, containerWidth: number, containerHeight: number, minWidth?: number, minHeight?: number, maxWidth?: number, maxHeight?: number): {
|
14 | unit: "px";
|
15 | x: number;
|
16 | y: number;
|
17 | width: number;
|
18 | height: number;
|
19 | };
|
20 | export declare function nudgeCrop(pixelCrop: PixelCrop, key: string, offset: number, ord: Ords): {
|
21 | unit: "px";
|
22 | x: number;
|
23 | y: number;
|
24 | width: number;
|
25 | height: number;
|
26 | };
|