Hello,
In my diagrams I need to draw a line from a Origin point (x,y) to destination point (x,y).
I tried to do something like this:
Shape lineShape = new Shape(new ElementTemplate[]
{
new LineTemplate(originX, originY, destX, destY)
},
FillMode.Winding, "test");
ShapeNode lineNode = new ShapeNode(diagram);
RectangleF rect = new RectangleF(originX, originY, 10, 10);
lineNode.Bounds = rect;
That creates a line but doesn't draw it exactly where I want it, because apparently the 2 points I set are used for the node and not the line itself.
I tried to use Factory.CreateDiagramLink with the (PointF origin,PointF dest) parameters, it works fine, but the problem is that I can't attach it to a group ( which I have to do ).
group.AttachToCorner(diagramLink, 2)
Basically I need to create a line using PointF origin, PointF destination and be able to attach it to a group that already exists.
Is that possible?
Thanks and sorry for the long thread