ConnectionUtilities
Utilities and extension methods related to connections.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public static class ConnectionUtilities
Inheritance: objectConnectionUtilities
Methods
Returns all the points of this connection, i.e. the start and end points together with the intermediate connection points.
public static IList<Point> AllPoints(this IConnection connection)
The connection.
Returns:IList<Point>
Calculates the middle point of line.
Gets the bezier default handle point.
Gets the bezier default handle point.
Gets the connection end points.
public static Tuple<Point, Point> GetConnectionEndPoints(this IConnection connection, bool useConnectionCoordinates = false)
The connection.
useConnectionCoordinatesboolIf set to true the points will be in global coordinates. If set to false, then the coordinates will be relative to the connection.
Gets the default handle bezier points.
public static Tuple<Point, Point> GetDefaultHandleBezierPoints(this IConnection connection, Point startPoint, Point endPoint, Point? sourceConnectorCenter = null, Point? targetConnectorCenter = null)
The connection.
startPointPointThe cached start point.
endPointPointThe cached end point.
sourceConnectorCenterPoint?The source connector center.
targetConnectorCenterPoint?The target connector center.
Returns:Returns the number of segments defined by the intermediate points.
public static int SegmentCount(this IConnection conn)
The connection.
Returns:Sets the connection points.
public static void SetConnectionPoints(this IConnection connection, IEnumerable<Point> connectionPoints)
The connection.
connectionPointsIEnumerable<Point>The connection points.
Shifts the ConnectionPoints by adding or substracting the Position vector.
public static IEnumerable<Point> TranslateConnectionPoints(this IConnection connection, bool globalCoordinates = true)
The connection. to shift.
globalCoordinatesboolIf set to true points will be transformed to global coordinates. If set to false, then the coordinates will be relative to the connection.
IEnumerable<Point>
The start/end points are not taken into account here.