We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PolyLineLink moving a vertex?

I am using poly line link in my application and I want to be able to move vertex points like I can on simple poly lines.

Is there a way to accomplish this?

Thanks,

Bob

5 Replies

J. J.Nagarajan Syncfusion Team February 10, 2007 03:07 AM UTC

Hi Bob,

Sorry for the delay in getting back to you. We have this functionality in our new version. But due to some internal testing issues, we are not able to ship this new version in 4.4. We have planned to release our next version with the fix for issue by second week of March,2007

Thanks for your patience.

Regards,
Nagaraj


RM Robert Maxey February 15, 2007 07:47 AM UTC



>Hi Bob,

Sorry for the delay in getting back to you. We have this functionality in our new version. But due to some internal testing issues, we are not able to ship this new version in 4.4. We have planned to release our next version with the fix for issue by second week of March,2007

Thanks for your patience.

Regards,
Nagaraj

So, if I understand correctly, the new changes will allow vertex editing for my custom symbols, as long as I implement the IPoints interface so that the diagram displays all of the vertex locations?

I ask, because I am getting close to release and I need your fixes or some other solution...

Thanks for the information!

Bob


J. J.Nagarajan Syncfusion Team February 15, 2007 11:23 PM UTC

Hi Bob,

The new version 5.0 will support vertex moving only . The fix of Vertex moving is available on March 15 with version 5.0 and the fix for Vertex editing is around June 15. Kindly accept our delay for fixing these issues.

Thanks for your patience.

Regards,
Nagaraj



RM Robert Maxey February 16, 2007 01:20 AM UTC



>Hi Bob,

The new version 5.0 will support vertex moving only . The fix of Vertex moving is available on March 15 with version 5.0 and the fix for Vertex editing is around June 15. Kindly accept our delay for fixing these issues.

Thanks for your patience.

Regards,
Nagaraj



No problem with the delay. I develop software too!

Can you explain the difference between vertex editing and moving. Isn't moving a vertex editing it?

Also, It would really help me prepare if I knew which interfaces I needed to implement. The IPoints seems to be the one. If this is the one I could be working on it while you were working on the new release.

So knowing which interface will be of great value to me.

Thanks!

Bob


J. J.Nagarajan Syncfusion Team February 16, 2007 08:21 PM UTC

Hi Bob,

1. Vertex Moving means you can move vertex points of the Poly line link like simple poly lines. Vertex Editing means You can add or remove the vertex points. You can use it only through keyboard shortcuts (Ctrl+LMBClick - remove vertex, Ctrl+Shift+LMBClick - add vertex, moving of vertex is hottracked).
Also currently the PolyLine fully supports vertex editing,the Line supports vertex moving. We have to implement the vertex moving and vertex editing for all links.

2. IPoins Interface for accessing and modifying the collection of points belonging to an object. IPoint.InsertPoint() and IPoint.RemovePoint() methods are used to insert and remove the points at the specific index position.

Currently the VertexEditTool has been merged with UITool. It can now only be used through keybord shortcuts. Press Ctrl+LMBClick to remove vertex and Ctrl+Shift+LMBClick to add vertex.Also only PolyLine fully supports vertex editing, thus Line supports vertex moving. All other elements don't support vertex editing due to architectural limitations.

Please refer to the InsertVertex(Point ptCurrent) and DeleteVertex() method in UITool class( please refer to \Windows\Diagram.Windows\Src\Tools\Tools.cs file).

Please refer to the following code snippet in UI class, then you can get an idea to implement the vertex point to the link.

private void InsertVertex( Point ptCurrent )
{
ILineSegments lineSegements = nodeUnderMouse as ILineSegments;
int segIdx = -1;
if (lineSegements != null)
{
segIdx = this.Controller.HitTestLineSegments(this.nodeLineSegments);
PointF ptWorld = this.Controller.View.ViewToWorld( this.Controller.View.DeviceToView( ptCurrent ) );
InsertVertexCmd insVertexCmd = new InsertVertexCmd(nodeUnderMouse, new Point((int)ptWorld.X, (int)ptWorld.Y));

if ( CanInsertVertex( nodeUnderMouse as IPoints ) )
insVertexCmd.Vertex = segIdx + 1;
this.Controller.ExecuteCommand(insVertexCmd);
}
}

private void DeleteVertex()
{
IPoints ptsNode = nodeUnderMouse as IPoints;

if( ( ptsNode != null ) && ( ptsNode.PointCount > ptsNode.MinPoints ) )
{
DeleteVertexCmd delVertexCmd = new DeleteVertexCmd( nodeUnderMouse, this.Controller.VertexHit );
this.Controller.ExecuteCommand( delVertexCmd );
}
}

Please let me know if you have any questions.

Thanks for using Syncfusion product.

Regards,
Nagaraj

Loader.
Live Chat Icon For mobile
Up arrow icon