EdgePathGenerator
- class EdgePathGenerator()
Interface for edge path generators.
A path generator is used to interpolate the edge path between two points.
interface
- EdgePathGenerator.generateEdgePath(start, end, startNormal, endNormal)
Generate the path string for the
dattribute of the svg<path>element.- Arguments:
start (Point) –
end (Point) –
startNormal (RotationVector) –
endNormal (RotationVector) –
- Returns:
string –
Implementations
SmoothedEdgePathGenerator
- class SmoothedEdgePathGenerator(smoothing, useOffsetPoints=true, offsetPointOffset=1)
An edge path generator that uses helper points and the d3 curve factories.
- Implements:
Create a new path generator.
- Arguments:
smoothing (CurveFactory|CurveFactoryLineOnly) –
useOffsetPoints (boolean) –
offsetPointOffset (number) –
- Returns:
SmoothedEdgePathGenerator –
- SmoothedEdgePathGenerator.lineGenerator
type: Line<Point>
- SmoothedEdgePathGenerator.offsetPointOffset
type: number
- SmoothedEdgePathGenerator.useOffsetPoints
type: boolean
- SmoothedEdgePathGenerator.generateEdgePath(start, end, startNormal, endNormal)
Generate the path string for the
dattribute of the svg<path>element.- Arguments:
start (Point) –
end (Point) –
startNormal (RotationVector) –
endNormal (RotationVector) –
- Returns:
string –
SteppedEdgePathGenerator
- class SteppedEdgePathGenerator()
A naive stepping path generator that tries to produce the shortest path using only lines parallel to the axes.
- Implements:
- Returns:
SteppedEdgePathGenerator –
- SteppedEdgePathGenerator.lineGenerator
type: Line<Point>
- SteppedEdgePathGenerator.generateEdgePath(start, end, startNormal, endNormal)
Generate the path string for the
dattribute of the svg<path>element.- Arguments:
start (Point) –
end (Point) –
startNormal (RotationVector) –
endNormal (RotationVector) –
- Returns:
string –