UNPKG

dotting

Version:

Dotting is a pixel art editor component library for react

27 lines (26 loc) 1.18 kB
import { MutableRefObject } from "react"; import { AddGridIndicesParams, DeleteGridIndicesParams, ImageDownloadOptions, LayerProps, PixelModifyItem } from "../components/Canvas/types"; import { DottingRef } from "../components/Dotting"; declare const useDotting: (ref: MutableRefObject<DottingRef | null>) => { clear: () => void; colorPixels: (changes: Array<PixelModifyItem>) => void; erasePixels: (changes: Array<{ rowIndex: number; columnIndex: number; }>) => void; downloadImage: (options: ImageDownloadOptions) => void; setIndicatorPixels: (indicators: Array<PixelModifyItem>) => void; undo: () => void; redo: () => void; setData: (data: Array<Array<PixelModifyItem>>) => void; setLayers: (layers: Array<LayerProps>) => void; addGridIndices: (params: AddGridIndicesParams) => void; deleteGridIndices: (params: DeleteGridIndicesParams) => void; getForegroundCanvas: () => HTMLCanvasElement; getBackgroundCanvas: () => HTMLCanvasElement; convertWorldPosToCanvasOffset: (x: number, y: number) => { x: number; y: number; }; }; export default useDotting;