public class EPSAdaptor extends GraphicsAdaptor
GraphicsAdaptor
for the EPS format.Modifier and Type | Field and Description |
---|---|
protected org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D |
graphics
The EPS document
|
protected ByteArrayOutputStream |
stream
The stream for saving the results
|
Constructor and Description |
---|
EPSAdaptor()
Creates a new adaptor for plotting to an EPS device.
|
Modifier and Type | Method and Description |
---|---|
void |
generateOutput(File file)
Generates the outputs and saves the results to the supplied file.
|
Graphics2D |
getGraphics(int width,
int height)
Returns a
Graphics2D object for this GraphicsAdaptor of the given width and height. |
String |
getGraphicsExtension()
Returns the file extension for the graphics file format of this
GraphicsAdaptor . |
generateOutput
protected org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D graphics
protected ByteArrayOutputStream stream
public EPSAdaptor()
public Graphics2D getGraphics(int width, int height) throws IOException
GraphicsAdaptor
Graphics2D
object for this GraphicsAdaptor
of the given width and height.
This object may be used for plotting using the standard Graphics2D
methods.getGraphics
in class GraphicsAdaptor
width
- the widthheight
- the heightGraphics2D
objectIOException
- if the graphics device could not be created (only applies to some adaptors)public void generateOutput(File file) throws IOException
GraphicsAdaptor
generateOutput
in class GraphicsAdaptor
file
- the fileIOException
- if the output could not be writtenpublic String getGraphicsExtension()
GraphicsAdaptor
GraphicsAdaptor
.getGraphicsExtension
in class GraphicsAdaptor