UNPKG

1.6 kBTypeScriptView Raw
1import { CubicBezierEdgeBase } from "./util/cubic-bezier-edge-base";
2import { EdgeFormattingValues, Label, EdgeOptions, Point, PointT, SelectiveRequired, VBody, VNode } from "./util/types";
3/**
4 * A Cubic Bezier Edge. Bezier curves are used to model smooth gradual curves in paths between nodes.
5 */
6export declare class CubicBezierEdge extends CubicBezierEdgeBase<[Point, 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">, viaNodes: [Point, Point]): void;
17 /**
18 * Compute the additional points the edge passes through.
19 *
20 * @returns Cartesian coordinates of the points the edge passes through.
21 */
22 protected _getViaCoordinates(): [Point, Point];
23 /** @inheritDoc */
24 getViaNode(): [Point, Point];
25 /** @inheritDoc */
26 protected _findBorderPosition(nearNode: VNode, ctx: CanvasRenderingContext2D): PointT;
27 /** @inheritDoc */
28 protected _getDistanceToEdge(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, [via1, via2]?: [Point, Point]): number;
29 /** @inheritDoc */
30 getPoint(position: number, [via1, via2]?: [Point, Point]): Point;
31}
32//# sourceMappingURL=cubic-bezier-edge.d.ts.map
\No newline at end of file