UNPKG

1.65 kBTypeScriptView Raw
1import { BezierEdgeBase } from "./util/bezier-edge-base";
2import { EdgeFormattingValues, Label, EdgeOptions, Point, PointT, SelectiveRequired, VBody, VNode } from "./util/types";
3/**
4 * A Static Bezier Edge. Bezier curves are used to model smooth gradual curves in paths between nodes.
5 */
6export declare class BezierEdgeStatic extends BezierEdgeBase<Point> {
7 /**
8 * Create a new instance.
9 *
10 * @param options - The options object of given edge.
11 * @param body - The body of the network.
12 * @param labelModule - Label module.
13 */
14 constructor(options: EdgeOptions, body: VBody, labelModule: Label);
15 /** @inheritDoc */
16 protected _line(ctx: CanvasRenderingContext2D, values: SelectiveRequired<EdgeFormattingValues, "backgroundColor" | "backgroundSize" | "shadowColor" | "shadowSize" | "shadowX" | "shadowY">, viaNode: Point): void;
17 /** @inheritDoc */
18 getViaNode(): Point;
19 /**
20 * Compute the coordinates of the via node.
21 *
22 * @remarks
23 * We do not use the to and fromPoints here to make the via nodes the same as edges without arrows.
24 *
25 * @returns Cartesian coordinates of the via node.
26 */
27 protected _getViaCoordinates(): Point;
28 /** @inheritDoc */
29 protected _findBorderPosition(nearNode: VNode, ctx: CanvasRenderingContext2D, options?: {
30 via?: Point;
31 }): PointT;
32 /** @inheritDoc */
33 protected _getDistanceToEdge(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, viaNode?: Point): number;
34 /** @inheritDoc */
35 getPoint(position: number, viaNode?: Point): Point;
36}
37//# sourceMappingURL=bezier-edge-static.d.ts.map
\No newline at end of file