On Fri, 3 Oct 2008 13:21:43 -0400
"Evan Teran" <[EMAIL PROTECTED]> wrote:

> Hey pancake (and everyone else).
> 
> The graphs look really nice, I was wondering, which libraries do you
> use to generate them?

I wrote my own graphing library in Vala + GTK named 'Grava'. I use this
api from C in the core. There are some examples in vala/grava in both
languages. It implements a gtk widget that can be embedded in any gtk
container with some callbacks for the communiocation with the parent
application.

using Grava;

class Main : Gtk.Window {
  Grava grava;

  construct {
     title = "Grava example";
     ...
     grava = new Grava.Widget();

     Node node = new Grava.Node();
     node.set("label", "sym_main:");
     node.set("color", "black");
     node.set("body", "mov eax, 33\nxor ebx, ebx");
     grava.add_node(node);

     Node node2 = new Grava.Node();
     node2.set("label", "sym_printf:");
     node2.set("color", "red");
     node2.set("body", "push ebp\nxor esp, esp");
     grava.add_node(node2);

     Edge edge = new Grava.Edge().with(node, node2);
     edge.set("color", "red");
     grava.add_edge(edge);

     add (grava.get_widget());
  }

  static int main (string[] args)
  {
     Gtk.init(ref args)
     var win = new Example();
     win.show_all();
     Gtk.main();
     return 0;
  }
}

...

The main current issue is the layout which I plan to temporally fix by using 
graphviz
to get the node positions. The renderer can be changed to be in libcaca or SDL 
:) but
actually it is not implemented..so the only renderer available is done in Cairo 
which
used OpenGL as backend.

read src/grava.c fmi


--pancake
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to