import { FimRect } from '@leosingleton/fim'; import { CoreCanvas2D, CoreMimeType } from '@leosingleton/fim/internals'; /** Wrapper around `CoreCanvas2D` to add browser-specific methods */ export declare abstract class CoreBrowserCanvas2D extends CoreCanvas2D { protected exportToFileAsync(type: CoreMimeType, quality?: number): Promise; /** * Converts this canvas to a `Blob` * @param type Mime type of the `Blob` * @param quality Optional compression quality (0.0 to 1.0) * @returns `Blob` */ abstract convertToBlobAsync(type: CoreMimeType, quality?: number): Promise; /** * Exports the canvas contents to another canvas * @param canvas Destination canvas * @param srcCoords Source coordinates to export, in pixels. If unspecified, the full image is exported. * @param destCoords Destination coordinates to render to. If unspecified, the output is stretched to fit the entire * canvas. * @param allowOversizedDest With the default value of `false`, an exception is thrown if `destCoords` is outside the * boundaries of `canvas`. If `true`, the bounds are not checked, allowing the image to be cropped when exporting. */ exportToCanvas(canvas: HTMLCanvasElement, srcCoords?: FimRect, destCoords?: FimRect, allowOversizedDest?: boolean): void; }