Can I use Grappa to generate GIF or JPEG images?
Grappa is intended for interactive display of graphs (zooming in,
deleting/adding elements, displaying an updated layout, etc).
While you can access
Java's print classes to print a graph, the default behavior Grappa uses is
to shrink the graph to the size of the paper. This behavior might still be OK
if you are generating a PDF that will be viewed on another computer,
but most graphs
get fairly illegible quickly unless you are printing on one of those HP
Plotters (the things with rolls of 3' or 4' wide paper).
If all you want is
to generate a GIF or JPEG, you need only use dot, neato
or the other graphviz layout tools directly, they take options to generate
such output.
You can also go the hybrid route, namely, use Grappa for interactive
display and then when a user wants a GIF/JPEG snapshot, use the
GrappaSupport.filterGraph() method to send the graph over to a server
running, for example, dot (or send it to a local dot executable)
and have it generate the image which can then be saved by the user.
(top)