does anyone have some experience with libgraphviz using the standard c library?
For my current project i would like to write a simple tool which visualize one of my abstract syntax tree in a jpg image or maybe even on a small X11 window. Graphviz itself provides
seven, different libraries i could use and link to my application:
- cdt
- cgraph
- gvc
- pack
- pathplan
- xdot
Unfortanetly, i have no idea which library is necessary for my task. I also don’t need to translate my tree representation to the dot language and would like write it directly to an image. (Of course, it Would be also great using an API that abstracts the transformation to the dot language).
Thanks for each advice 🙂
Please take a look at the libguide.pdf on the graphviz web site. The guide explains how to use graphviz as a library and contains sample programs in c.
The examples also show how to add nodes and edges, and depending on your tree representation, it may be relatively simple to translate it to node and edge creation calls.