Hi,
first of all thanks for this great library.
I am trying to export my graph to SVG but no success.
An example:
public class ExportTest {
public static void main(String args[]) {
DefaultGraph g = new DefaultGraph("export SVG");
g.addAttribute("ui.quality");
g.addAttribute("ui.antialias");
g.addNode("A");
g.addNode("B");
g.addNode("C");
g.addEdge("AB", "A", "B");
g.addEdge("AC", "A", "C");
g.addEdge("BC", "B", "C");
g.display();
String path = "export/graph.svg";
FileSink out = new FileSinkSVG2();
SpringBox sb = new SpringBox();
g.addSink(sb);
sb.addAttributeSink(g);
sb.shake();
sb.compute();
while (sb.getStabilization() < 1) {
sb.compute();
}
try {
out.writeAll(g, path);
} catch (IOException ex) {
System.err.println(ex);
return;
}
}
}
But I get the svg file attached, which is clearly not correct.
What am I doing wrong?
Thank you
Eduardo
Archives gérées par MHonArc 2.6.16.