Hi Allen,
We suggest you to use below list of connector’s properties/methods to get the head, tail and control (joint in between) points of the connectors.
|
Properties/methods |
Description |
|
TailEndPoint/HeadEndPoint’s “Location” property |
Use TailEndPoint/HeadEndPoint “Location” property to get the endpoints of the connectors. |
|
GetControlPoints() |
Use Connector’s “GetControlPoints()” method to get the ControlPoints collection and use ControlPoint’s “Location” property to get the control points (i.e. joint in between points).
|
|
GetPoints() |
Also, use Connetor’s “GetPoints()” method to get the all points (endpoints and controlpoints) of the connector. |
Code example:
[VB]
Dim pts() As PointF = { New PointF(100, 100), New PointF(400, 150), New PointF(100, 250), New PointF(150, 200) }
Dim line As New PolyLineConnector(pts)
'tailend point to get the tail location
Dim tailLocation As PointF = line.TailEndPoint.Location
'HeadEndPoint to get the head location
Dim headLocation As PointF = line.HeadEndPoint.Location
'GetControlPoints methods to get the controlpoints
Dim ctrlPts() As ControlPoint = line.GetControlPoints()
Dim ctrlPt As New ArrayList()
For Each controlpt As ControlPoint In ctrlPts
ctrlPt.Add(controlpt.Location)
Next controlpt
'Use GetPoints() method to get all points (end and control points)
Dim linePts() As PointF = line.GetPoints()
Regards,
Naganathan K G