Package org.graphstream.ui.swingViewer.util

Examples of org.graphstream.ui.swingViewer.util.Graphics2DOutput


        try {
          String plugin = "org.graphstream.ui.batik.BatikGraphics2D";
          Class<?> c = Class.forName(plugin);
          Object o = c.newInstance();
          if (o instanceof Graphics2DOutput) {
            Graphics2DOutput out = (Graphics2DOutput) o;
            Graphics2D g2 = out.getGraphics();
            render(g2, (int) camera.getMetrics().viewport[0],
                (int) camera.getMetrics().viewport[1],
                (int) camera.getMetrics().viewport[2],
                (int) camera.getMetrics().viewport[3]);
            out.outputTo(filename);
          } else {
                        logger.warning(String.format("Plugin %s is not an instance of Graphics2DOutput (%s).", plugin, o.getClass().getName()));
          }
        } catch (Exception e) {
                    logger.log(Level.WARNING, "Unexpected error during screen shot.", e);
View Full Code Here

TOP

Related Classes of org.graphstream.ui.swingViewer.util.Graphics2DOutput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.