grandalf icon indicating copy to clipboard operation
grandalf copied to clipboard

Drawing to a file?

Open dakami opened this issue 8 years ago • 3 comments

Not entirely obvious how to patch Grandalf to draw to a file,.

dakami avatar Dec 03 '16 19:12 dakami

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 .

bdcht avatar Dec 11 '16 08:12 bdcht

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

michaelkariv avatar Mar 07 '17 07:03 michaelkariv

Any vector format is fine; it's pretty simple to take SVG/PDF and convert to something else.

dakami avatar Jun 21 '17 06:06 dakami