Package com.ardor3d.image.util.awt
Class ScreenShotImageExporter
java.lang.Object
com.ardor3d.image.util.awt.ScreenShotImageExporter
- All Implemented Interfaces:
ScreenExportable
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMake a new exporter with the default settings:ScreenShotImageExporter
(File directory, String prepend, String format, boolean useAlpha) Construct a new exporter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
export
(ByteBuffer data, int width, int height) Export the given image data (byte buffer) in a manner of our choosing.boolean
void
setDirectory
(File directory) void
setFileFormat
(String format) void
setPrepend
(String prepend) void
setUseAlpha
(boolean useAlpha)
-
Field Details
-
_directory
-
_prepend
-
_fileFormat
-
_useAlpha
protected boolean _useAlpha -
_lastFile
-
-
Constructor Details
-
ScreenShotImageExporter
public ScreenShotImageExporter()Make a new exporter with the default settings:directory: local working directory prepend: "capture_" format: "png" useAlpha: false
-
ScreenShotImageExporter
Construct a new exporter.- Parameters:
directory
- the directory to save the screen shots in.prepend
- a value to prepend onto the generated file name. This must be at least 3 characters long.format
- the format to use for saving the image. ImageIO is used for this, so safe values are likely: "png", "jpg", "gif" and "bmp"useAlpha
- true for alpha values to be stored in image (as applicable, depending on the given format)
-
-
Method Details
-
export
Description copied from interface:ScreenExportable
Export the given image data (byte buffer) in a manner of our choosing. Note that this byte buffer should be treated by the implementing class as immutable and temporary. If you need access to it after returning from the method, make a copy.- Specified by:
export
in interfaceScreenExportable
- Parameters:
data
- the data from the screen. Please respect the data's limit() value.width
- the widthheight
- the height
-
getFormat
- Specified by:
getFormat
in interfaceScreenExportable
- Returns:
- the image data format we'd like to pull in.
-
getLastFile
- Returns:
- the last File written by this exporter, or null if none were written.
-
getDirectory
-
setDirectory
-
getPrepend
-
setPrepend
-
isUseAlpha
public boolean isUseAlpha() -
setUseAlpha
public void setUseAlpha(boolean useAlpha) -
getFileFormat
-
setFileFormat
-