From: Mooffie n/a Date: 2010-04-21T19:32:45+09:00 Subject: Re: DrX, an object inspector Arndt Roger Schneider wrote: > > What about generating documentation through your class browser? I'm not sure what you mean here. (You believe the object graph DrX produces can be generated by existing documentation tools? I'm not aware of similar tool(s). Sure, rdoc can tell me class A has class B as its parent, but it's *very* far from the complete and dynamic picture DrX gives. Try and see for yourself.) > > This would be very doable if I had it pipe to > > this javascript rendition of graphviz. > > http://code.google.com/p/canviz/ That's interesting. I'll have a look at it. > > Why not SVG? Graphviz already generates SVG It's true that GraphViz can output SVG, but from my (not very extensive) tests it's not very good at that. The problem seem to be in fonts: GraphViz doesn't know the metrics of the font the browser will use, so the labels seem big and don't always fall completely inside the shape. BTW, the fact that some program "generates SVG" isn't enough. Most programs don't generate semantic SVG: they use SVG as a direct replacement for GD/X11/Win32 calls, and the result it's very useful. For example, you can't add some style to your CSS to paint certain objects in green. It won't work. To see what I mean, create an SVG in 'dia', open it in Inkscape, and try to edit it. Perhaps Canviz genrates a more semantic output. I don't yet know. (DrX has a "Save..." button that lets you save the image. The GIT repository contains a branch where you can pick an SVG format. But the imperfect SVG GraphViz produces didn't encourage me to incorporate this feature into the master branch...) > > ImageMagick for the shadow-effect: > You could use tkpath or tkzinc instead for [...] Thanks for the info. (That shadow effect isn't that important. Frankly, I concocted it just to have nicer screenshots on the homepage.) -- Posted via http://www.ruby-forum.com/.