The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
MFMeera Fathima Syncfusion Team May 28, 2007 04:30 AM UTC
Hello Ali,
Thank you using Essential Diagram.
If you want to draw a polygon shape node, please see the sample code snippet provided below.
private void CreatePolygon() { PointF[] pts = new PointF[] { new PointF(20, 40), new PointF(100,60), new PointF(100, 120), new PointF(20,100) }; Polygon polygon = new Polygon( pts ); this.diagram1.Model.AppendChild(polygon); }
This is also demonstrated in the Diagram Samples\Symbol Design\Simple Flow sample. Please look into the sample's MainForm.CreateCustomPolygon() method in particular.
Thanks, Meera
MFMeera Fathima Syncfusion Team May 28, 2007 05:07 AM UTC
Hello Ali,
Continuing with my previous update, the nodes can be rotated by using the Node.Rotate() method. For e.g. if you want to rotate the polygon to certain angle,you can do this by using polygon.Rotate(45) method.
Please see the sample code snippet that shows how to do this.
private void CreatePolygon() { PointF[] pts = new PointF[] { new PointF(20, 40), new PointF(100,60), new PointF(100, 120), new PointF(20,100) }; Polygon polygon = new Polygon( pts ); polygon.Rotate(45); // Rotates polygon to 45 degree. this.diagram1.Model.AppendChild(polygon); }