RoutingBase
Base class for routing algorithms.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public abstract class RoutingBase : IRouter
Inheritance: objectRoutingBase
Derived Classes:
Implements:
Constructors
Initializes a new instance of the RoutingBase class.
Methods
Given a point on the edge of a shape, this returns the middle point of the edge adjacent to it in the clockwise direction.
protected static Point ClockwiseMoveAroundEdgeOfShape(Point point, IDiagramItem shape)
The point on the edge of the shape.
shapeIDiagramItemThe shape holding the point.
Returns: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.
Finds the crossings.
protected static void FindCrossings(IConnection connection, ref Point source, ref Point target)
The connection.
sourcePointThe source.
targetPointThe target.
Given the connection, the most probable start and end points are returned together with some additional points if necessary.
protected static Tuple<Point, Point, Point, Point, Point, Point> FindMostProbableTuple(IConnection connection)
The connection which is being routed.
Returns:Tuple<Point, Point, Point, Point, Point, Point>
A tuple containing
- the source point; this is the start point given by the connection
- the intermediate start point: the point which is not necessarily on
the grid but which forms the corner between the endpoint of the connection and
the nearest grid point. It's defined by the place where the endpoint is located
on the shape. If the endpoint is free (because the connection is free at that
point) the intermediate endpoint is
NaN. - the actual start point for the routing procedure
- the end point of the routing procedure
- the intermediate end point: analog as the intermediate start point.
- the target point; this is the end or target point given by the connection.
Gets the route points.
public abstract IList<Point> GetRoutePoints(IConnection connection, bool showLastLine = true)
The connection.
showLastLineboolIf set to true [show last line].
IList<Point>
Implements: