Page 1 of 1

Arc Link in SimpleGraph

PostPosted: June 16th, 2008, 10:18 pm
by Marcelo Salas
Hi...

I'm newbie using TSimpleGraph.
I need to know if it's possible to construct an Arc Link object additional to TGraphLink.

How can I do it?

Regards.

Marcelo

PostPosted: June 21st, 2008, 8:56 am
by Kambiz
Hi,

You should subclass TGraphLink to replace each segment of link lines with a Bézier curve. I guess you will find some could at http://sourceforge.net/projects/extgraph/.

PostPosted: June 25th, 2008, 7:08 pm
by Marcelo Salas
Hi Kambiz...

Thanks for your reply...
I was reviewing the code of extgraph project. I extracted TBezierLink code and push it on TSimplegraph extended (this is my little contribution).

Finally TSimpleGraph have the following new features:
1.- TBezierLink and TCurveLink are based on Stefan Melis code (extgraph Project), allows to draw an arc link between two nodes.
In addition, those links can hook the same node.
2.- TInitUMLNode and TFinishUMLNode draws Initial and Finish Nodes
according to UML State Diagrams

Problems:
1.- When TBezierLink is created, the 4 points used for drawing the
initial curve are not created correctly. I need some help to solve this problem.

I attach a picture with the new features and the complete project for others (in Delphi 2007).

Sincerely
Marcelo

PostPosted: June 26th, 2008, 10:28 am
by Kambiz
It looks very nice, my compliments.

I don't have exprience on Bezier Curves, so I can't help you for solving the problem, sorry.

PostPosted: June 28th, 2008, 3:25 pm
by kokkoras
The picture looks great! Where is the problem ?