import { Canvas, SKRSContext2D } from '@napi-rs/canvas'; type CanvasAndContext = { canvas?: Canvas; context?: SKRSContext2D; }; declare class NodeCanvasFactory { /** * Creates a new canvas context with the specified width and height. * @param width The width of the canvas. * @param height The height of the canvas. * @returns A new canvas context with the specified width and height. * @throws An error if the width or height is less than or equal to zero. */ create(width: number, height: number): { canvas: Canvas; context: SKRSContext2D; }; /** * Resets the canvas to the specified width and height. * @param canvasAndContext - The canvas and its context. * @param width - The new width of the canvas. * @param height - The new height of the canvas. */ reset(canvasAndContext: CanvasAndContext, width: number, height: number): void; /** * Destroys the canvas and its context by setting the canvas width and height to 0 and * setting the canvas and context properties to undefined. * @param canvasAndContext - The canvas and its context to be destroyed. */ destroy(canvasAndContext: CanvasAndContext): void; } export { type CanvasAndContext, NodeCanvasFactory };