GraphStream Users

Archives de la liste Aide

Taking Screenshots

Chronologique Discussions 
  • From: <anja.ha99 AT>
  • To: graphstream-users AT
  • Subject: Taking Screenshots
  • Date: Wed, 11 Mar 2020 19:05:47 +0100 (CET)


I am using GraphStream to visualize network ontologies. Unfortunately, I
encountered some problems with taking .svg screenshots of my MultiGraph.

Whereas the export as .png does work correctly using the screenshot() method
the GraphRenderer, the same method which should also work for the .svg
screenshot does not work and results in the following output on the console:
"Unexpected error during screen shot. java.lang.ClassNotFoundException:
org.graphstream.ui.batik.BatikGraphics2D". I could not find that
BatikGraphics2D anywhere in gs-ui-javafx, no matter which version.

I tried using FileSinkSVG2 instead. However, that does create an .svg in the
correct directory, but it is completely blank every time.

This is my code:

String path = "C:\\somewhere\\test.svg";

FileSinkSVG2 svg = new FileSinkSVG2();

try {
svg.writeAll(this.graph, path);

} catch (IOException ex) {
//the exception has not been thrown even once

I am using the following dependencies:


I would be very grateful for every help or pointer.


  • Taking Screenshots, anja.ha99, 11/03/2020

Archives gérées par MHonArc 2.6.16.

Top of page