de.erichseifert.gral.io.plots
Interface DrawableWriter

All Known Implementing Classes:
BitmapWriter, VectorWriter

public interface DrawableWriter

Interface providing functions for rendering Drawable instances and writing them to an output stream. As an example: a plot can be saved into a bitmap file.


Method Summary
 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.
 

Method Detail

getMimeType

String getMimeType()
Returns the output format of this writer.

Returns:
String representing the MIME-Type.

write

void write(Drawable d,
           OutputStream destination,
           double width,
           double height)
           throws IOException
Stores the specified Drawable instance.

Parameters:
d - Drawable to be written.
destination - Stream to write to
width - Width of the image.
height - Height of the image.
Throws:
IOException - if writing to stream fails

write

void write(Drawable d,
           OutputStream destination,
           double x,
           double y,
           double width,
           double height)
           throws IOException
Stores the specified Drawable instance.

Parameters:
d - Drawable to be written.
destination - Stream to write to
x - Horizontal position.
y - Vertical position.
width - Width of the image.
height - Height of the image.
Throws:
IOException - if writing to stream fails


Copyright © 2009-2010. All Rights Reserved.