Default implementation of an edge intersection calculator.
Provides static access to an edge intersection calculator instance.
public function cropEdgePath(edge:IEdge, atSource:Boolean, arrow:IArrow, edgePath:GeneralPath):void
Crops the provided edgePath at one end of an edge.
Parameters
| edge:IEdge — The edge whose path is to be cropped.
|
| |
| atSource:Boolean — Whether to crop the source or target side of the path.
|
| |
| arrow:IArrow — The arrow that is used at the end of the edge.
|
| |
| edgePath:GeneralPath — The path to crop.
|
protected function cropEdgePathAtArrow(edgePath:GeneralPath, atSource:Boolean, arrow:IArrow):void
Crops an edge's path at the source or target side with respect to the given arrow.
Parameters
| edgePath:GeneralPath — The edge's path to crop.
|
| |
| atSource:Boolean — if set to true the source side is cropped.
|
| |
| arrow:IArrow — The arrow to consider for the cropping.
|
protected function getIntersection(node:INode, nodeShapeGeometry:IShapeGeometry, edge:IEdge, innerX:Number, innerY:Number, outerX:Number, outerY:Number, intersection:IPointSetter):Boolean
Finds the intersection between a node and the edge.
Parameters
| node:INode — The node for which the intersection is to be found.
|
| |
| nodeShapeGeometry:IShapeGeometry — The node's geometry
|
| |
| edge:IEdge — The edge for which the intersection is to be found.
|
| |
| innerX:Number — The x coordinate of the edge's point inside the node.
|
| |
| innerY:Number — The y coordinate of the edge's point inside the node.
|
| |
| outerX:Number — The x coordinate of the edge's point outside the node.
|
| |
| outerY:Number — The y coordinate of the edge's point outside the node.
|
| |
| intersection:IPointSetter — The point to store the intersection point in.
|
Returns
| Boolean — true if an intersection point was found.
|
protected function inside(x:Number, y:Number, node:INode, nodeShapeGeometry:IShapeGeometry, edge:IEdge):Boolean
Checks whether a given point is inside a node's shape geometry with respect to the edge that is being calculated.
Parameters
| x:Number — The x coordinate of the point inside the node.
|
| |
| y:Number — The y coordinate of the point inside the node.
|
| |
| node:INode — The node to take into account.
|
| |
| nodeShapeGeometry:IShapeGeometry — The geometry of the node.
|
| |
| edge:IEdge — The Edge which intersects the node.
|
Returns
| Boolean — true if the point is inside the node.
|