grandalf
grandalf copied to clipboard
Drawing to a file?
Not entirely obvious how to patch Grandalf to draw to a file,.
Hi, rendering is not implemented in grandalf. Any rendering method should take a computed layout instance as input or possibly as a parent class and add drawing methods there based on nodes/edges positions computed by the layout instance. You can have a look at amoco.ui.graphics.qt_ package and its graphwin.py module which implements a GraphScene that takes a "sug" input supposed to be a SugiyamaLayout instance and draws on a Qt canvas (see GraphView). Qt provides ways for drawing to a file then in various image format.
On Sat, Dec 3, 2016 at 8:51 PM, dakami [email protected] wrote:
Not entirely obvious how to patch Grandalf to draw to a file,.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bdcht/grandalf/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AAuwNWOTGHzg23esJOFcWaihQGdZwVBhks5rEchUgaJpZM4LDZfP .
I am considering doing an SVG rendering of the Graph. would you be interested? The only thing that stops me is that I need what GraphViz calls "cluster" and blockdiag calls "group" - the way of one node to contain another. If only grandalf had it.. Anyway, back to rendering , what format would you want to render the graph in? blockdiag has PNG (requires Pillow), and PDF. To me SVG is all i need. But if there is another format need out there I will approach implementation in a more modular way
Any vector format is fine; it's pretty simple to take SVG/PDF and convert to something else.