public class VectorWriter extends IOCapabilitiesStorage implements DrawableWriter
Class that stores Drawable
instances as vector graphics.
This implementation requires the VectorGraphics2D library to provide
support for the following file formats:
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
.
Modifier | Constructor and Description |
---|---|
protected |
VectorWriter(String mimeType)
Creates a new
VectorWriter object with the specified
MIME-Type. |
Modifier and Type | Method and Description |
---|---|
String |
getMimeType()
Returns the output format of this writer.
|
void |
write(Drawable d,
OutputStream destination,
double width,
double height)
Stores the specified
Drawable instance. |
void |
write(Drawable d,
OutputStream destination,
double x,
double y,
double width,
double height)
Stores the specified
Drawable instance. |
addCapabilities, getCapabilities
protected VectorWriter(String mimeType)
VectorWriter
object with the specified
MIME-Type.mimeType
- Output MIME-Type.public void write(Drawable d, OutputStream destination, double width, double height) throws IOException
Drawable
instance.write
in interface DrawableWriter
d
- Drawable
to be written.destination
- Stream to write towidth
- Width of the image.height
- Height of the image.IOException
- if writing to stream failspublic void write(Drawable d, OutputStream destination, double x, double y, double width, double height) throws IOException
Drawable
instance.write
in interface DrawableWriter
d
- Drawable
to be written.destination
- Stream to write tox
- Horizontal position.y
- Vertical position.width
- Width of the image.height
- Height of the image.IOException
- if writing to stream failspublic String getMimeType()
getMimeType
in interface DrawableWriter
Copyright © 2009-2013. All Rights Reserved.