UNPKG

@thi.ng/hiccup-canvas

Version:

Hiccup shape tree renderer for vanilla Canvas 2D contexts

24 lines 987 B
import type { IObjectOf } from "@thi.ng/api"; import type { ReadonlyVec } from "@thi.ng/vectors"; export declare const polygon: (ctx: CanvasRenderingContext2D, attribs: IObjectOf<any>, pts: ReadonlyVec[]) => void; export declare const packedPolygon: (ctx: CanvasRenderingContext2D, attribs: IObjectOf<any>, opts: IObjectOf<any>, pts: ArrayLike<number>) => void; /** * Shared internal helper for polygon & polyline fns. * * @param ctx - canvas context * @param pts - poly vertices * * @internal */ export declare const __drawPoly: (ctx: CanvasRenderingContext2D, pts: ReadonlyVec[]) => void; /** * Shared internal helper for packed polygon & polyline fns. * * @param ctx - canvas context * @param opts - original shape atttribs (here only for packing config) * @param pts - flat vertex buffer * * @internal */ export declare const __drawPackedPoly: (ctx: CanvasRenderingContext2D, opts: IObjectOf<any>, pts: ArrayLike<number>) => void; //# sourceMappingURL=polygon.d.ts.map