Class RoutingBase
Base class for routing algorithms.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public abstract class RoutingBase : IRouter
Constructors
RoutingBase(IGraphInternal)
Initializes a new instance of the RoutingBase class.
Declaration
protected RoutingBase(IGraphInternal graph)
Parameters
IGraphInternal
graph
The graph. |
Methods
ClockwiseMoveAroundEdgeOfShape(Point, IDiagramItem)
Given a point on the edge of a shape, this returns the middle point of the edge adjacent to it in the clockwise direction.
Declaration
protected static Point ClockwiseMoveAroundEdgeOfShape(Point point, IDiagramItem shape)
Parameters
System.Windows.Point
point
The point on the edge of the shape. |
IDiagramItem
shape
The shape holding the point. |
Returns
System.Windows.Point
|
Remarks
This method is called when the routing algorithm is unable to find a route from the given starting point and an alternative starting point at the edge of the shape is necessary.
FindCrossings(IConnection, ref Point, ref Point)
Finds the crossings.
Declaration
protected static void FindCrossings(IConnection connection, ref Point source, ref Point target)
Parameters
IConnection
connection
The connection. |
System.Windows.Point
source
The source. |
System.Windows.Point
target
The target. |
FindMostProbableTuple(IConnection)
Given the connection, the most probable start and end points are returned together with some additional points if necessary.
Declaration
protected static Tuple<Point, Point, Point, Point, Point, Point> FindMostProbableTuple(IConnection connection)
Parameters
IConnection
connection
The connection which is being routed. |
Returns
System.Tuple<System.Windows.Point, System.Windows.Point, System.Windows.Point, System.Windows.Point, System.Windows.Point, System.Windows.Point>
A tuple containing
|
GetRoutePoints(IConnection, Boolean)
Gets the route points.
Declaration
public abstract IList<Point> GetRoutePoints(IConnection connection, bool showLastLine = true)
Parameters
IConnection
connection
The connection. |
System.Boolean
showLastLine
If set to |
Returns
System.Collections.Generic.IList<System.Windows.Point>
|
Implements
GetSector(Point, Rect)
Gets the sector.
Declaration
protected static Sector GetSector(Point point, Rect bounds)
Parameters
System.Windows.Point
point
|
System.Windows.Rect
bounds
|
Returns
Sector
|
PointIsInNeighborhoodOfShape(Point)
Returns whether the given point is in the neighborhood of a shape.
Declaration
protected bool PointIsInNeighborhoodOfShape(Point point)
Parameters
System.Windows.Point
point
The point. |
Returns
System.Boolean
|
PointIsInShape(Point)
Returns whether the given point resides in one of the shapes in the diagram.
Declaration
protected bool PointIsInShape(Point point)
Parameters
System.Windows.Point
point
The point. |
Returns
System.Boolean
|