Re: [Doxygen-develop] [Doxygen] SVG/Layout
Brought to you by:
dimitri
From: Dimitri v. H. <di...@st...> - 2004-03-20 16:10:38
|
On Mon, Mar 15, 2004 at 09:57:47AM +0000, Fred P. wrote: > Hi Dimitry, > > I was wondering about your layout/routing algorithm for the DOT program > output. > > http://j2k.sourceforge.net/docs/example/classVectorialImageFileIOStream.html > http://j2k.sourceforge.net/docs/example/classJFileInStream.html > > i.e. The way you draw arrows and box: positionate them, draw them. > I was reading your source code (diagram.* dot.*) > > bool TreeDiagram::layoutTree(DiagramItem *root,int r); > void TreeDiagram::moveChildren(DiagramItem *root,int dx); > void TreeDiagram::computeLayout(); > uint TreeDiagram::computeRows(); > void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos); For your info. Doxygen has a build in diagram generator (TreeDiagram in src/diagram.*) which can only do trees. All new development is done with the DOT tool (as shown by your links), where doxygen only generates the graph description and DOT takes care of all the layouting. > I'm just wondering what are the "strict" dependancies on those... > > Also, I wanted to add SVG output support via > 1) external SVG files (instead of PNG) > 2) ActiveX embedded SVG within html (for ASV3 and ASV6pr1) > [ Adobe SVG Viewer http://www.adobe.com/svg/ ] Recent version of DOT can already do SVG output, so it is probably very easy to add SVG as an output format (besides jpg, gif, and png). > Looking at the doxygen source doxygened callgraphs, > modifying diagram/dot/image should probably be sufficient, > but I would like to make a patch and submitted to you, > so others can benefit from it. > > It's not hard at all to have SVG, it's just a question of duplicating the > code > and make the appropriate changes... see below. I think that with using dot, duplication can be avoided. > I'm just confuse where what is what and what is needed to perform things > to translate layout into JavaScript, the overall minimal Qt infrastructure > for those class was translatate in JS, including a good part of them. > > Here some SVG possible things to do: > > If you were kind enough to give me some hint, > I would really appreciate. I suggest to look src/dot.cpp and look for places where DOT_IMAGE_FORMAT is used. I think SVG could be added to the possible formats, and then it is just a matter of tweaking the output (if needed at all). Regards, Dimitri |