Search in sources :

Example 1 with ImageOutputHandler

use of y.io.ImageOutputHandler in project binnavi by google.

the class GraphExporters method exportAllAsPNG.

// Warning on raw types on the following methods are suppressed. We need to use the raw type to
// allow these methods to be called without introducing dependencies on yFiles.
@SuppressWarnings("unchecked")
public static boolean exportAllAsPNG(final AbstractZyGraph zygraph, final String filename) throws IOException {
    Graph2DView view = zygraph.getView();
    final ImageOutputHandler png = createPNGOutputHandler();
    exportGraphToImageFileFormat(view.getGraph2D(), png, filename, png.createDefaultGraph2DView(view.getGraph2D()));
    return true;
}
Also used : Graph2DView(y.view.Graph2DView) ImageOutputHandler(y.io.ImageOutputHandler)

Example 2 with ImageOutputHandler

use of y.io.ImageOutputHandler in project binnavi by google.

the class GraphExporters method exportPartAsPNG.

@SuppressWarnings("unchecked")
public static void exportPartAsPNG(final AbstractZyGraph zygraph, final String filename) throws IOException {
    Graph2DView view = zygraph.getView();
    final ImageOutputHandler png = createPNGOutputHandler();
    png.setAntialiasingEnabled(true);
    exportGraphPartToImageFileFormat(view.getGraph2D(), png, filename);
}
Also used : Graph2DView(y.view.Graph2DView) ImageOutputHandler(y.io.ImageOutputHandler)

Aggregations

ImageOutputHandler (y.io.ImageOutputHandler)2 Graph2DView (y.view.Graph2DView)2