Re: [Doxygen-develop] [Doxygen] SVG/Layout
Brought to you by:
dimitri
From: Fred P. <j2...@ho...> - 2004-03-21 11:04:29
|
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. That's what I figured out yesterday... :-| Okay, so maybe you can merge my Version 2 or 3 of SVG for the non-dot algorithm. and add output support for SVG for the DOT version. It might be cleaner to have a derivate SvgImage : public Image class with virtual function and have a switch or Factory to generate PNG or SVG or BOTH for the non-dot version. 2,885 03-21-04 5:09a instream0.svg 3,390 03-21-04 5:06a instream2.svg 994 03-21-04 4:57a instream1.svgz 953 03-21-04 5:09a instream3.svgz 744 03-21-04 4:54a classInStream__coll__graph.dot 1,028 03-21-04 4:46a classFileInStream__coll__graph.dot 1,792 03-21-04 4:46a classFileInStream__coll__graph.png 1,027 03-21-04 4:46a classInStream__coll__graph.png As you can see, the generated SVG file is bigger than png, but not when gzip -9 -Sz, which in that case it's smaller. If you produce "cleaner" code you save 600 bytes uncompressed and 40 bytes compressed. The generated grouping is not bad, except that you lose the context inside the SVG file. So we need a couple of CONFIG options to keep the context in the DOT generated version. Some tweaking need to be done in the DOT SVG output, I'll try to contact DOT team. I also need to change the colors of the UML output, I don't like it! =P I want an IBM Rational Rose color scheme and icons. Something that looks like this: http://j2k.sourceforge.net/UML/NTO/TrainLayoutTest_Big.png generating an SVG UML diagram that can be "web-based" edited like this: http://j2k.sourceforge.net/svg/august/umled12k.svg I have those "optimized" for SVG and also in GIF. For GIF See: http://j2k.sourceforge.net/svg/attribute.gif http://j2k.sourceforge.net/svg/function.gif Also, there should be a way to 'tweak' the anti-aliasing and fonts. I prefer aliasing or non-anti-aliasing for shapes and small fonts, see: http://j2k.sourceforge.net/svg/box.gif http://j2k.sourceforge.net/svg/box2.gif http://j2k.sourceforge.net/svg/box.svg UML buttons: http://j2k.sourceforge.net/svg/btn_all4.svgz My current layout scheme (not based on doxygen nor dot): http://j2k.sourceforge.net/svg/new_layout/layout5.js.svg > > 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). Yeah I saw that. =) I guess I'll dig into DOT code, but it's kinda complicated a bit... =( > > 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. Sure, but I might consider linking dot into doxygen for speed issue... as a first step. I'm generating lots of stuff from this (100MB) just try doxygen doxygen =^P Maybe skipping the DOT format generator, system calls, DOT format parser and provide direct linking would help. In such case, providing the interface to link GraphViz would be sufficient with a proper Config option DOT_LINK_LIBRARY Maybe I have to look if any license issues? http://www.gnu.org/licenses/gpl.html http://www.research.att.com/sw/tools/graphviz/license/ > > 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). In my case that's needed. =) Is that too much to ask for release v1.3.7 ? ;-) { discreetly crossing fingers... 8-) } Let say a 'quick' SVG add-on release with few Config options? Thanks! Fred. >Regards, > Dimitri _________________________________________________________________ MSN Premium: Up to 11 personalized e-mail addresses and 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines |