de.erichseifert.gral.io.plots
Class VectorWriter
- java.lang.Object
-
- de.erichseifert.gral.io.IOCapabilitiesStorage
-
- de.erichseifert.gral.io.plots.VectorWriter
-
- All Implemented Interfaces:
- DrawableWriter
public class VectorWriter extends IOCapabilitiesStorage implements DrawableWriter
Class that stores
Drawableinstances as vector graphics. This implementation requires the VectorGraphics2D library to provide support for the following file formats:- Encapsulated PostScript (EPS)
- Portable Document Format (PDF)
- Scalable Vector Graphics (SVG)
If the VectorGraphics2D library isn't available the file formats aren't registered in the plug-in system. This class shouldn't be used directly but using the
DrawableWriterFactory.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetMimeType()Returns the output format of this writer.voidwrite(Drawable d, java.io.OutputStream destination, double width, double height)Stores the specifiedDrawableinstance.voidwrite(Drawable d, java.io.OutputStream destination, double x, double y, double width, double height)Stores the specifiedDrawableinstance.-
Methods inherited from class de.erichseifert.gral.io.IOCapabilitiesStorage
getCapabilities
-
-
-
-
Method Detail
-
write
public void write(Drawable d, java.io.OutputStream destination, double width, double height) throws java.io.IOException
Stores the specifiedDrawableinstance.- Specified by:
writein interfaceDrawableWriter- Parameters:
d-Drawableto be written.destination- Stream to write towidth- Width of the image.height- Height of the image.- Throws:
java.io.IOException- if writing to stream fails
-
write
public void write(Drawable d, java.io.OutputStream destination, double x, double y, double width, double height) throws java.io.IOException
Stores the specifiedDrawableinstance.- Specified by:
writein interfaceDrawableWriter- Parameters:
d-Drawableto be written.destination- Stream to write tox- Horizontal position.y- Vertical position.width- Width of the image.height- Height of the image.- Throws:
java.io.IOException- if writing to stream fails
-
getMimeType
public java.lang.String getMimeType()
Returns the output format of this writer.- Specified by:
getMimeTypein interfaceDrawableWriter- Returns:
- String representing the MIME-Type.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG