import { PaperTextureOptions, PathCmd, PathStyle, Surface } from "../types.js"; //#region src/surfaces/canvas2d.d.ts /** The slice of the 2D context this surface actually touches. */ type Ctx2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D; declare class Canvas2DSurface implements Surface { ctx: Ctx2D; width: number; height: number; constructor(ctx: Ctx2D, width?: number, height?: number); private _trace; path(cmds: PathCmd[], style: PathStyle): void; clip(cmds: PathCmd[], fn: () => void): void; rect(x: number, y: number, w: number, h: number, style: PathStyle): void; group(transform: string, fn: () => void): void; background(color: string): void; /** Speckled grain, drawn once into an offscreen tile and repeated. */ paperTexture({ opacity, scale, rng }?: PaperTextureOptions): void; } //#endregion export { Canvas2DSurface, Canvas2DSurface as default, Ctx2D };