@dartbot/dartboard
Version:
Dartboard implemented as a vanilla web component
15 lines (14 loc) • 631 B
TypeScript
import { Theme } from '../theme';
import { PolarPoint } from '../utils';
import { Board } from './board';
/**
* Render the dartboard to the canvas
* @param board Board dimensions
* @param zoom Zoom factor
* @param center Center point of the board on the canvas
* @param fit Fit mode for the board 'contain' or 'cover'
* @param hits List of hits to draw on the board
* @param theme Theme to style the board
* @param context Context API for the canvas
*/
export declare const render: (board: Board, zoom: number, center: PolarPoint, fit: string, hits: PolarPoint[], theme: Theme, context: CanvasRenderingContext2D) => void;