UNPKG

@9am/img-halftone

Version:

A web component turns <img> into halftone.

23 lines (22 loc) 633 B
import type { Painter, Pair } from './types'; import { Shape } from './types'; import Channel from './channel'; export declare class CanvasPainter implements Painter { static shapeMap: Map<Shape, Function>; dom: HTMLCanvasElement; private ctx; private shape; constructor({ shape }: { shape: Shape; }); draw(channels: Channel[], size: Pair): void; } export declare class GridPainter implements Painter { static randomChar: () => string; dom: HTMLElement; constructor({ shape }: { shape: Shape; }); private createLayer; draw(channels: Channel[], size: Pair): void; }