- From: <anja.ha99 AT gmail.com>
- To: graphstream-users AT litislab.fr
- Subject: Taking Screenshots
- Date: Wed, 11 Mar 2020 19:05:47 +0100 (CET)
Hello,
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
of
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:
System.setProperty("gs.ui.renderer",
"org.graphstream.ui.j2dviewer.J2DGraphRenderer");
.....
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:
<dependency>
<groupId>com.github.graphstream</groupId>
<artifactId>gs-core</artifactId>
<version>2.0-alpha</version>
</dependency>
<dependency>
<groupId>com.github.graphstream</groupId>
<artifactId>gs-ui-javafx</artifactId>
<version>2.0-alpha</version>
</dependency>
I would be very grateful for every help or pointer.
Regards,
Anja
- Taking Screenshots, anja.ha99, 11/03/2020
Archives gérées par MHonArc 2.6.16.