import { Marker, Path, StrokeData, Svg } from "@svgdotjs/svg.js"; import { CSSProperties } from "react"; import { FlowNode, Line, NodeMargin, Direction, FlowTextType, Grid, RectArea } from "./types"; /** * 找出节点上的连接中点 * @param node * @param type * @param direction * @param colWidth * @param rowHeight * @param nodeHeight * @param nodeWidth * @param margin * @param arrowZoom * @returns */ export declare const nodeMiddle: (node: FlowNode, type: number, direction: Direction, colWidth: number, rowHeight: number, nodeHeight: number, nodeWidth: number, margin: NodeMargin, arrowZoom: number) => number[]; /** * 找出转折点,将其转为圆弧 * @param points * @returns */ export declare const drawLineWithArc: (points: number[][]) => string; /** * 根据开始节点和结束节点给出中间的折线连接节点 * @param line * @param nodes * @param dis * @param cols * @param rows * @param colWidth * @param rowHeight * @param nodeHeight * @param nodeWidth * @param margin * @param arrowZoom * @returns */ export declare const linePath: (line: Line, nodes: FlowNode[], dis: number, cols: unknown[][], rows: unknown[][], colWidth: number, rowHeight: number, nodeHeight: number, nodeWidth: number, margin: NodeMargin, arrowZoom: number) => string; /** * 给出每个节点的绝对位置 * @param item * @param margin * @param colWidth * @param rowHeight * @param nodeWidth * @param nodeHeight * @returns */ export declare const position: (item: FlowNode, margin: NodeMargin, colWidth: number, rowHeight: number, nodeWidth: number, nodeHeight: number) => CSSProperties; /** * 根据颜色改变连接线及箭头颜色 * @param path * @param arrow * @param color */ export declare const changeLineColor: (path: Path, arrow: Marker, color: string) => void; /** * 画连接线 * @param draw * @param lines * @param arrowSize * @param hoverLineColor * @param defaultLineStroke * @param nodes * @param dis * @param cols * @param rows * @param colWidth * @param rowHeight * @param nodeHeight * @param nodeWidth * @param margin */ export declare const drawLines: (draw: Svg, lines: Line[], arrowSize: number, hoverLineColor: string, defaultLineStroke: StrokeData, nodes: FlowNode[], dis: number, cols: unknown[][], rows: unknown[][], colWidth: number, rowHeight: number, nodeHeight: number, nodeWidth: number, margin: NodeMargin) => void; /** * 画矩形 * @param draw * @param rects * @param wrapperWidth * @param wrapperHeight * @param colWidth * @param rowHeight * @param defaultRectStroke */ export declare const drawRects: (draw: Svg, rects: RectArea[], wrapperWidth: number, wrapperHeight: number, colWidth: number, rowHeight: number, defaultRectStroke: StrokeData) => void; /** * 画网格线 * @param draw * @param wrapperWidth * @param wrapperHeight * @param grid * @param colWidth * @param rowHeight * @param defaultGridStroke */ export declare const drawGrid: (draw: Svg, wrapperWidth: number, wrapperHeight: number, grid: Grid, colWidth: number, rowHeight: number, defaultGridStroke: StrokeData) => void; /** * 给流程图添加文字 * @param draw * @param texts * @param defaultTextFont * @param defaultGridStroke * @param rowHeight * @param colWidth */ export declare const drawTexts: (draw: Svg, texts: FlowTextType[], defaultTextFont: object, defaultGridStroke: StrokeData, rowHeight: number, colWidth: number) => void;