|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BitmapWriter
This interface is used to represents an image output format. The methods are tile oriented so that tiled image formats may be optimally supported. Note that if the header is declared with a 0 tile size, the image will not be written with identical sized tiles. The image should either be buffered so it can be written all at once on close, or an eror should be thrown. The bitmap writer should be designed so that it is thread safe. Specifically, this means that the tile writing method can be called by several threads.
Method Summary | |
---|---|
void |
closeFile()
Close the file, this completes the bitmap writing process. |
void |
configure(java.lang.String option,
java.lang.String value)
This method will be called before writing begins. |
void |
openFile(java.lang.String filename)
Open a handle to the specified file for writing. |
void |
writeHeader(int width,
int height,
int tileSize)
Write the bitmap header. |
void |
writeTile(int x,
int y,
int w,
int h,
Color[] color,
float[] alpha)
Write a tile of data. |
Method Detail |
---|
void configure(java.lang.String option, java.lang.String value)
option
- value
- void openFile(java.lang.String filename) throws java.io.IOException
filename
- filename to write the bitmap to
java.io.IOException
- thrown if an I/O error occursvoid writeHeader(int width, int height, int tileSize) throws java.io.IOException, java.lang.UnsupportedOperationException
width
- image widthheight
- image heighttileSize
- tile size or 0 if the image will not be sent in tiled
form
java.io.IOException
- thrown if an I/O error occurs
java.lang.UnsupportedOperationException
- thrown if this writer does not
support writing the image with the supplied tile sizevoid writeTile(int x, int y, int w, int h, Color[] color, float[] alpha) throws java.io.IOException
x
- tile x coordinatey
- tile y coordinatew
- tile widthh
- tile heightcolor
- color dataalpha
- alpha data
java.io.IOException
- thrown if an I/O error occursvoid closeFile() throws java.io.IOException
java.io.IOException
- thrown if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |