1 | import { SmartPoint } from "../geom-utils";
|
2 | import { Point, PvjsonNode, PvjsonEdge } from "../gpml2pvjson";
|
3 | /**
|
4 | * calculateAllPoints for edges of type Elbow and Curved
|
5 | *
|
6 | * PathVisio-Java does not always specify all the points needed to draw edges
|
7 | * of type Elbow and Curved. Unless the user drags one or more of the
|
8 | * waypoints, PathVisio-Java will only specify the first and last points,
|
9 | * leaving implicit one or more additional points that are required to draw
|
10 | * the edge.
|
11 | *
|
12 | * Kaavio requires that a PvjsonEdge specifies ALL the points required for
|
13 | * drawing the edge, so this function calculates any implicit points required
|
14 | * to unambiguously specify an edge and returns the full set of points
|
15 | * (implicit points are made explicit).
|
16 | *
|
17 | * @param explicitPoints {Array}
|
18 | * @param [sourceEntity] {Object} entity from which the EDGE emanates
|
19 | * (never an Anchor)
|
20 | * @param [targetEntity] {Object} entity into which the EDGE terminates
|
21 | * (never an Anchor)
|
22 | * @return {Array} Full set of points required to render the edge
|
23 | */
|
24 | export declare function calculateAllPoints(explicitPoints: (Point & SmartPoint)[], sourceEntity?: PvjsonNode | PvjsonEdge, targetEntity?: PvjsonNode | PvjsonEdge): Point[];
|