| Package | com.yworks.graph.model |
| Class | public class DefaultEdgeIntersectionCalculator |
| Inheritance | DefaultEdgeIntersectionCalculator Object |
| Implements | IEdgeIntersectionCalculator |
Provides static access to an edge intersection calculator instance.
| Method | Defined By | ||
|---|---|---|---|
Crops the provided edgePath at one end of an edge. | DefaultEdgeIntersectionCalculator | ||
| Method | Defined By | ||
|---|---|---|---|
Crops an edge's path at the source or target side with respect to the given arrow. | DefaultEdgeIntersectionCalculator | ||
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. | DefaultEdgeIntersectionCalculator | ||
Checks whether a given point is inside a node's shape geometry with respect to the edge that is being calculated. | DefaultEdgeIntersectionCalculator | ||
| Constant | Defined By | ||
|---|---|---|---|
| INSTANCE : DefaultEdgeIntersectionCalculator [static] | DefaultEdgeIntersectionCalculator | ||
| cropEdgePath | () | method |
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.
|
| cropEdgePathAtArrow | () | method |
protected function cropEdgePathAtArrow(edgePath:GeneralPath, atSource:Boolean, arrow:IArrow):voidCrops 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.
|
| getIntersection | () | method |
protected function getIntersection(node:INode, nodeShapeGeometry:IShapeGeometry, edge:IEdge, innerX:Number, innerY:Number, outerX:Number, outerY:Number, intersection:IPointSetter):BooleanFinds 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.
|
Boolean — true if an intersection point was found.
|
| inside | () | method |
protected function inside(x:Number, y:Number, node:INode, nodeShapeGeometry:IShapeGeometry, edge:IEdge):BooleanChecks 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.
|
Boolean — true if the point is inside the node.
|
| INSTANCE | Constant |
public static const INSTANCE:DefaultEdgeIntersectionCalculator