import { IGrammarContext, IGrammarDepend, IGrammarOptions, IGrammarSeries } from './model'; export declare const GRAMMAR_DEPEND_COLORS: { FONT: string; GREEN: string; BLUE: string; DEFAULT: string; }; export declare const GRAMMAR_DEPENDS: IGrammarDepend[]; export declare const GRAMMAR_DEFAULT_OPTIONS: Required; export declare class GrammarRender { /** * zrender */ render: any | null; /** * 依赖关系 */ depends: IGrammarDepend[]; /** * 高亮类型 */ activeTypes: string[] | undefined; /** * context */ context: IGrammarContext; /** * 初始化 * * @param canvasDom * @param series * @param activeTypes */ init(canvasDom: HTMLDivElement, series: IGrammarSeries, activeTypes?: string[] | undefined): void; /** * 初始化 canvas * 对画布样式做调整,主要是 width 和 height */ private initRender; /** * 扩展 relation */ private expendRelations; /** * 生成带箭头的线条 * @param type * @param fromX * @param toX * @param Y * @param lineY */ private line; /** * 根据每个entitiesRelation划线 * @param options * @param wordGroup * @param entitiesRelation */ private lineTo; /** * 计算每个词中可发出/接受节点的 x 坐标值,通过 percent 定位具体位置 * @param options * @param word * @param percent */ private calcEndPointX; /** * 划线 * @param wordGroup */ private ligatureEntities; /** * 绘制词对象,包括词的外边框等特性 * @param options */ private renderWords; private createWord; /** * 计算词的边距(高度宽度视 type 而定) */ private calcWordGauge; private finish; }