- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs
Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
/**
|
|
* 如果自定义箭头并且有 d 需要做偏移,如果直接画,线条会超出箭头尖端,因此需要根据箭头偏移 d, 返回线需要缩短的距离
|
|
* |----------------
|
|
* |<|--------------
|
|
* |
|
|
* @param {number} x1 起始点 x
|
|
* @param {number} y1 起始点 y
|
|
* @param {number} x2 箭头作用点 x
|
|
* @param {number} y2 箭头作用点 y
|
|
* @param {number} d 箭头沿线条方向的偏移距离
|
|
* @return {{dx: number, dy: number}} 返回线条偏移距离
|
|
*/
|
|
export declare function getShortenOffset(x1: any, y1: any, x2: any, y2: any, d: any): {
|
|
dx: number;
|
|
dy: number;
|
|
};
|
|
/**
|
|
* 绘制起始箭头
|
|
* @param {IShape} shape 图形
|
|
* @param {ShapeAttrs} attrs shape 的绘图属性
|
|
* @param {number} x1 起始点 x
|
|
* @param {number} y1 起始点 y
|
|
* @param {number} x2 箭头作用点 x
|
|
* @param {number} y2 箭头作用点 y
|
|
*/
|
|
export declare function addStartArrow(shape: any, attrs: any, x1: any, y1: any, x2: any, y2: any): void;
|
|
/**
|
|
* 绘制结束箭头
|
|
* @param {IShape} shape 图形
|
|
* @param {ShapeAttrs} attrs shape 的绘图属性
|
|
* @param {number} x1 起始点 x
|
|
* @param {number} y1 起始点 y
|
|
* @param {number} x2 箭头作用点 x
|
|
* @param {number} y2 箭头作用点 y
|
|
*/
|
|
export declare function addEndArrow(shape: any, attrs: any, x1: any, y1: any, x2: any, y2: any): void;
|