Interface Graphics2DOutput


public interface Graphics2DOutput
A special interface for renderers that allows to replace the Graphics2D.

Several external libraries use to replace the Graphics2D of AWT in order to produce a file or on a printer in a given format. However it is not possible to link such libraries in the gs-core module of GraphStream. To avoid this problem, this interface defines a plug-in that must implement be able to yield a Graphics2D usable instead of the default one.

  • Method Summary

    Modifier and Type Method Description
    java.awt.Graphics2D getGraphics()
    The graphics to use instead of the default Graphics2D of AWT.
    void outputTo​(java.lang.String outputName)
    Output (if needed) the results of the last painting done with the Graphics2D.
  • Method Details

    • getGraphics

      java.awt.Graphics2D getGraphics()
      The graphics to use instead of the default Graphics2D of AWT.
    • outputTo

      void outputTo​(java.lang.String outputName) throws java.io.IOException
      Output (if needed) the results of the last painting done with the Graphics2D.
      Parameters:
      outputName - The name of the output to use, for some renderers it is a file, for others it is an URL, a string description of the output, etc.
      Throws:
      java.io.IOException