#1 2010-07-27 03:31:49

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

GraphiViz?

Hi,

I noticed in the description of SynProject you mentioned, Graphiviz, did you port it to Delphi? That'll be wonderful if you did! If yes, where I can get that part of code? Thanks in advance!]

BTW, you did great jobs!


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2010-07-27 03:47:46

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: GraphiViz?

Oh, downloaded the source from the repository, noticed it uses the WinGraphviz project which looks interesting, do you know does it support Graphviz's auto-layout feature? That's what I'm interested in! I assume graphiviz allows me to setup a diagram with the dot language, then it do the calculation and give me the coordinate values, then I can do the drawing with other more sophisticated drawing engine like GDI+.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#3 2010-07-27 07:49:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: GraphiViz?

We embedded the WinGraphviz dll to SynProject.

This version has some avantages:
1. No installation needed: just initialize the COM library, then use the COM interface;
2. Generates emf (i.e. metafiles) files, so you can draw them using GDI, or directly using GDI+ using our SynGdiPlus unit.

But I discovered some problems:
1. Vectorial files problems (background layout not transparent, wrong character placement...);
2. There is a resource leak in the dll (if you create a lot of diagrams, you'll have to quit and relaunch SynProject);
3. Code not maintained since years (therefore it didn't involve with the product);
4. Code difficult to compile again.

But it does it work for our purpose.

So yes, Graphviz auto-layout feature works very well, and you can get the rendering in the "plain text output format" if you want. You can try to parse it and render it in Delphi code.

We use Graphiviz in Synproject to produce:
a) classes hierarchy and units dependencies directly from source code of the project;
b) diagrams for the documentation, written as text in the documentation wiki format itself.

Offline

#4 2010-08-02 10:09:00

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: GraphiViz?

Thanks for the info, unfortunately the COM wrapper does not updated for a few years already now...


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#5 2015-01-19 22:15:37

EMartin
Member
From: Buenos Aires - Argentina
Registered: 2013-01-09
Posts: 337

Re: GraphiViz?

GraphViz web site is updated, UML diagram sequence would be fantastic. UMLGraph http://www.umlgraph.org/doc/seq-intro.html is a good example but another textual representation could be better, for i.e:

TMyClass->TMyOtherClass.Method1(param. definitions) // call method without return
TMyClass<-TMyOtherClass.Method1(param. definitions) // return method
TMyClass<->TMyOtherClass.Method1(param. definitions) // call method with return
TMyClass->TMyOtherClass.Create(param. definitions) // create an instance
...
etc.

but you has made something about this.

Best regards.


Esteban

Offline

Board footer

Powered by FluxBB