nidi3 / graphviz-java

Use graphviz with pure java
Apache License 2.0
937 stars 107 forks source link

rasterize using dot instead of batik/svgsalamander #119

Closed mx1up closed 5 years ago

mx1up commented 5 years ago

Hi,

I have trouble outputting a graph to png on a raspberry pi. Enabling the antialiasing on the Graphics2D yields some weird rendering artifacts which makes the output unreadable. So this is a problem on its own which can probably be solved by fiddling on the pi, but then I thought: is it not possible to rasterize the graph using dot itself (i.e. -Tpng:cairo) bypassing the rasterization using batik/svgsalamander altogether? That would make it much faster and more memory efficient i guess and it would fix my antialiasing problem at once since I already successfully converted to png with CLI dot command with antialiasing. Or does that not fit well into the framework?

cheers matthias

nidi3 commented 5 years ago

With version 0.9.0 there's Rasterizer.builtIn() to rasterize directly with graphviz. However, this works only with GraphvizCmdLineEngine.

mx1up commented 5 years ago

nidi, you're awesome :) it works!