public class TGAWriter
extends java.lang.Object
Screenshot
class; can also be used
in conjunction with the TileRenderer
class. Constructor and Description |
---|
TGAWriter()
Constructor for the TGAWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.nio.ByteBuffer |
getImageData()
Returns the ByteBuffer corresponding to the data for the image.
|
void |
open(java.io.File file,
int width,
int height,
boolean alpha)
Opens the specified Targa file for writing, overwriting any
existing file, and sets up the header of the file expecting the
data to be filled in before closing it.
|
public void open(java.io.File file, int width, int height, boolean alpha) throws java.io.IOException
file
- the file to write containing the screenshotwidth
- the width of the current drawableheight
- the height of the current drawablealpha
- whether the alpha channel should be saved. If true,
requires GL_EXT_abgr extension to be present.java.io.IOException
- if an I/O error occurred while writing the
filepublic java.nio.ByteBuffer getImageData()
public void close() throws java.io.IOException
java.io.IOException
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.