import { Diagram } from '../../parser/diagram'; import { ArrowType, LineType } from '../../parser/enum'; import { DrawingBox } from '../graphics/GraphicBox'; import { IBoundingBox } from '../graphics/interfaces'; export interface IHashMap { [key: string]: any; } export declare const DIAGRAM_MARGIN = 10; export declare const SELF_SIGNAL_WIDTH = 20; export declare const ALIGN_LEFT = 0; export declare const ALIGN_CENTER = 1; export declare const ALIGN_HORIZONTAL_CENTER = 2; export declare const ALIGN_VERTICAL_CENTER = 3; export declare abstract class BaseDrawer { font: IHashMap; protected diagram: Diagram; protected constructor(diagram: Diagram); draw(container: HTMLElement): void; drawTextBox(box: DrawingBox, text: string, margin: number, padding: number, align: number): void; abstract setupCanvas(container: HTMLElement): void; abstract resize(width: number, height: number): void; abstract textBBox(text: string, font?: IHashMap): IBoundingBox; abstract drawRect(x: number, y: number, w: number, h: number): void; abstract drawText(x: number, y: number, text: string, font: IHashMap, align: number): void; abstract drawLine(x1: number, y1: number, x2: number, y2: number, lineType?: LineType, arrowHead?: ArrowType): void; }