Packagecom.yworks.yfiles.layout
Interfacepublic interface IntersectionCalculator

Interface implemented by classes that are responsible for calculating the intersection point between an Edge and the visual representation of its source or target node. This interface is especially useful in conjunction with the com.yworks.yfiles.layout.PortCalculator com.yworks.yfiles.layout.LayoutStage .

See also

com.yworks.yfiles.layout.PortCalculator
com.yworks.yfiles.layout.LayoutStage


Public Methods
 MethodDefined By
  
calculateIntersectionPoint(nl:NodeLayout, xOffset:Number, yOffset:Number, dx:Number, dy:Number):YPoint
Calculates an intersection point given the coordinates of a point lying on the last/first segment of an Edge and a normalized direction.
IntersectionCalculator
Method Detail
calculateIntersectionPoint()method
public function calculateIntersectionPoint(nl:NodeLayout, xOffset:Number, yOffset:Number, dx:Number, dy:Number):YPoint

Calculates an intersection point given the coordinates of a point lying on the last/first segment of an Edge and a normalized direction. If no such intersection can be found this method should return null.

Parameters

nl:NodeLayout — the currently calculated com.yworks.yfiles.layout.NodeLayout
 
xOffset:Number — the relative (to the node's center) x-coordinate of a point on the last line segment
 
yOffset:Number — the relative y-coordinate of a point on the last line segment
 
dx:Number — the x component of the normalized direction vector indicating the direction of the segment pointing towards the node
 
dy:Number — the y component of the normalized direction vector indicating the direction of the segment pointing towards the node

Returns
YPoint — the new relative (to the node's center) intersection coordinates or null if no such intersection could be found

See also