UNPKG

mobility-toolbox-js

Version:

Toolbox for JavaScript applications in the domains of mobility and logistics.

25 lines (24 loc) 1.42 kB
import type { AnyCanvas } from '../../types'; export declare const rotateCanvas: (canvas: AnyCanvas, rotation: number) => void; export declare const getArrowCanvas: (arrowSize: number[], fillColor: string, pixelRatio?: number) => AnyCanvas | null; export declare const getBufferArrowCanvas: (width: number, height: number, fillColor: string, arrowSize?: number[], rotation?: number, pixelRatio?: number, margin?: number) => AnyCanvas | null; /** * Draw circle delay background */ export declare const getDelayBgCanvas: (radius: number, color: string, pixelRatio?: number, blurWidth?: number) => AnyCanvas; export declare const getCanvasTextSize: (text: string, font: string, color: string, outlineColor: string, outlineWidth: number, pixelRatio: number) => { height: number; width: number; }; /** * Draw delay text */ export declare const getDelayTextCanvas: (text: string, fontSize: number, font: string, color: string, outlineColor?: string, pixelRatio?: number) => AnyCanvas; /** * Draw colored circle with black border */ export declare const getCircleCanvas: (radius: number, color: string, hasStroke: boolean, hasDash: boolean, pixelRatio: number) => AnyCanvas | null; /** * Draw text in the circle */ export declare const getTextCanvas: (text: string, radius: number, textSize: number, fillColor: string, strokeColor: string, hasStroke: boolean, pixelRatio: number, font: string) => AnyCanvas | null;