Packagecom.yworks.graph.drawing
Interfacepublic interface IPathGeometry
Implementors AbstractEdgeStyleRenderer, VoidPathGeometry

Interface that is used mainly by IEdgeStyleRenderer implementations to reveil geometric details about the visualization of an edge's path.



Public Methods
 MethodDefined By
  
Returns a representation of the visible path of the edge in form of a GeneralPath
IPathGeometry
  
Returns the number of "segments" this edge's path consists of.
IPathGeometry
  
getSegmentTangent(segment:int, ratio:Number, p:YPoint, v:YPoint):Boolean
Calculates the tangent on the edge's path at the given segment and ratio point.
IPathGeometry
  
getTangent(ratio:Number, p:YPoint, v:YPoint):Boolean
Calculates the tangent on the edge's path at the given ratio point.
IPathGeometry
Method Detail
getPath()method
public function getPath():GeneralPath

Returns a representation of the visible path of the edge in form of a GeneralPath

Returns
GeneralPath — An instance that describes the visible path or null if this is not applicable for the current geometry.
getSegmentCount()method 
public function getSegmentCount():int

Returns the number of "segments" this edge's path consists of.

Returns
int — the number of segments or -1 if there is no such thing as a segment for this edge.
getSegmentTangent()method 
public function getSegmentTangent(segment:int, ratio:Number, p:YPoint, v:YPoint):Boolean

Calculates the tangent on the edge's path at the given segment and ratio point.

The result is provided through the given point parameters. If the method returns false, no valid result could be calculated and the values of the point parameters should be ignored.

Parameters

segment:int — the index of the zero-based segment.
 
ratio:Number — a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path.
 
p:YPoint — A point in world-coordinate space that denotes the tangent point.
 
v:YPoint — The vector which is tangent to the edge's path at the point p. The tangent vector needs not necessarily be normalized.

Returns
Booleantrue iff the values written to the given points are valid.
getTangent()method 
public function getTangent(ratio:Number, p:YPoint, v:YPoint):Boolean

Calculates the tangent on the edge's path at the given ratio point.

The result is provided through the given point parameters. If the method returns false, no valid result could be calculated and the values of the point parameters should be ignored.

Parameters

ratio:Number — a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path.
 
p:YPoint — A point in world-coordinate space that denotes the tangent point.
 
v:YPoint — The vector which is tangent to the edge's path at the point p. The tangent vector needs not necessarily be normalized.

Returns
Booleantrue iff the values written to the given points are valid.