UNPKG

@plait/draw

Version:

Implementation of the core logic of the flowchart drawing tool plugin.

14 lines (13 loc) 1.61 kB
import { Point, PlaitBoard, RectangleClient } from '@plait/core'; import { ArrowLineHandle, ArrowLineShape, ArrowLineText, PlaitArrowLine, PlaitShapeElement } from '../../interfaces'; export declare const createArrowLineElement: (shape: ArrowLineShape, points: [Point, Point], source: ArrowLineHandle, target: ArrowLineHandle, texts?: ArrowLineText[], options?: Pick<PlaitArrowLine, "strokeColor" | "strokeWidth">) => PlaitArrowLine; export declare const getArrowLinePoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[]; export declare const getCurvePoints: (board: PlaitBoard, element: PlaitArrowLine) => Point[]; export declare const drawArrowLine: (board: PlaitBoard, element: PlaitArrowLine) => SVGGElement; export declare const getHitConnection: (board: PlaitBoard, point: Point, hitElement: PlaitShapeElement) => Point; export declare const getHitConnectionFromConnectionPoint: (connectionPoint: Point, hitElement: PlaitShapeElement) => Point; export declare const getHitConnectorPoint: (point: Point, hitElement: PlaitShapeElement) => Point | undefined; export declare const getArrowLineTextRectangle: (board: PlaitBoard, element: PlaitArrowLine, index: number) => RectangleClient; export declare const getArrowLines: (board: PlaitBoard) => PlaitArrowLine[]; export declare const Q2C: (points: Point[]) => Point[]; export declare const handleArrowLineCreating: (board: PlaitBoard, lineShape: ArrowLineShape, sourcePoint: Point, movingPoint: Point, sourceElement: PlaitShapeElement | null, lineShapeG: SVGGElement, options?: Pick<PlaitArrowLine, "strokeColor" | "strokeWidth">) => PlaitArrowLine;