UNPKG

@thi.ng/rasterize

Version:

Headless 2D shape drawing, filling & rasterization for arbitrary targets/purposes (no canvas required)

14 lines 563 B
import type { IGrid2D, TypedArray } from "@thi.ng/api"; import type { Shader2D } from "./api.js"; /** * Fills cells in the connected region around `x,y` with given value or shader * function. If the latter, the shader is called for each grid coordinate and * returns a fill value. Returns updated grid. * * @param grid - * @param x - * @param y - * @param val - */ export declare const floodFill: <T extends any[] | TypedArray, P>(grid: IGrid2D<T, P>, x: number, y: number, val: P | Shader2D<P>) => IGrid2D<T, P>; //# sourceMappingURL=flood-fill.d.ts.map