public class BitmapWriter extends IOCapabilitiesStorage implements DrawableWriter
Drawable
instances as bitmap graphics.
Supported formats:
This class shouldn't be used directly but using the
DrawableWriterFactory
.
Modifier | Constructor and Description |
---|---|
protected |
BitmapWriter(String mimeType)
Creates a new
BitmapWriter 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 BitmapWriter(String mimeType)
BitmapWriter
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.