Class
GridRouter

Routing based on the A* algorithm.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public sealed class GridRouter : RoutingBase, IRouter

Inheritance: objectRoutingBaseGridRouter

Implements: IRouter

Constructors

GridRouter(IGraphInternal)

Initializes a new instance of the GridRouter class.

Declaration

cs-api-definition
public GridRouter(IGraphInternal diagram)

Parameters

diagram

IGraphInternal

The diagram.

GridRouter(IGraphInternal, Func<Point, bool>)

Initializes a new instance of the GridRouter class.

Declaration

cs-api-definition
public GridRouter(IGraphInternal diagram, Func<Point, bool> locationDelegate)

Parameters

diagram

IGraphInternal

The diagram.

locationDelegate

Func<Point, bool>

The location delegate.

Properties

Cutoff

This is a cutoff for the A*-search and represents the buffer of points.

Declaration

cs-api-definition
public static int Cutoff { get; set; }

Property Value

int

Methods

FindDuplicate(IEnumerable<Point>)

Finds the duplicate in the list of points which leads to loops in the paths.

Declaration

cs-api-definition
public static Point? FindDuplicate(IEnumerable<Point> source)

Parameters

source

IEnumerable<Point>

The source.

Returns

Point?

GetRoutePoints(IConnection, bool)

Gets the route points.

Declaration

cs-api-definition
public override IList<Point> GetRoutePoints(IConnection connection, bool showLastLine = true)

Parameters

connection

IConnection

The connection.

showLastLine

bool

If set to true the intermediate points will be added to the resulting path.

Returns

IList<Point>

Overrides RoutingBase.GetRoutePoints(IConnection, bool)

RemoveLoops(IList<Point>)

Removes the loops in the point list.

Declaration

cs-api-definition
public static IList<Point> RemoveLoops(IList<Point> points)

Parameters

points

IList<Point>

The points.

Returns

IList<Point>

Route(Point, Point)

Returns null, if no path is found. Start- and End-Node are included in returned path.

Declaration

cs-api-definition
public IList<Point> Route(Point startPoint, Point endPoint)

Parameters

startPoint

Point

endPoint

Point

Returns

IList<Point>