UNPKG

@raducal/isomer

Version:

A simple isometric graphics library for HTML5 canvas

21 lines (20 loc) 605 B
import { Point } from './point'; import { Color } from './color'; import { Drawable } from './isomer'; export type CanvasOptions = { willReadFrequently?: boolean; alpha?: boolean; dpr?: number; }; declare class Canvas { private elem; private ctx; width: number; height: number; constructor(elem: HTMLCanvasElement | OffscreenCanvas, options?: CanvasOptions); clear(): void; draw: (points: Point[], color: Color, drawable?: Drawable) => void; path(points: Point[], color: Color, drawable?: Drawable): void; private calculateBoundingBox; } export { Canvas };