UNPKG

alex_image_marker

Version:

24 lines (23 loc) 959 B
import { InitOptions, DrawType, GraphConfigType, MatrixType, GraphMap } from '../data'; import { default as ZImage } from '../image'; import { default as Graph } from '../graph/index'; export default class Canvas { readonly canvas: HTMLCanvasElement; readonly ctx: CanvasRenderingContext2D; readonly MOVE = "MOVE"; readonly DEFAULT = "DEFAULT"; readonly CROSSHAIR = "CROSSHAIR"; private graphMap; private graphList; constructor(options: Required<InitOptions>); get data(): Graph[]; graphClass(type: keyof DrawType): GraphMap; drawImage(imageInstance: ZImage): void; clearRect(): void; redrawGraph(): void; createGraph<T extends keyof DrawType>(type: T, options: GraphConfigType<T>, scale: number, imageMatrix: MatrixType): Graph; addGraph(graph: Graph): Graph; removeGraph(ids?: string[]): void; updateImageMatrix(imageMatrix: MatrixType): void; updateImageScale(scale: number): void; }