Package gaiasky.screenshot
Class BufferedFileImageRenderer
- java.lang.Object
-
- gaiasky.screenshot.BufferedFileImageRenderer
-
- All Implemented Interfaces:
IFileImageRenderer
public class BufferedFileImageRenderer extends java.lang.Object implements IFileImageRenderer
Buffers the writing of images to disk.
-
-
Constructor Summary
Constructors Constructor Description BufferedFileImageRenderer(int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()Flushes the renderer causing the images to be written, if needed.java.lang.StringsaveScreenshot(java.lang.String folder, java.lang.String fileprefix, int w, int h, boolean immediate, GlobalConf.ImageFormat type, float quality)Renders a screenshot in the given location with the given prefix and the given size.
-
-
-
Method Detail
-
saveScreenshot
public java.lang.String saveScreenshot(java.lang.String folder, java.lang.String fileprefix, int w, int h, boolean immediate, GlobalConf.ImageFormat type, float quality)Description copied from interface:IFileImageRendererRenders a screenshot in the given location with the given prefix and the given size.- Specified by:
saveScreenshotin interfaceIFileImageRenderer- Parameters:
folder- Folder to save.fileprefix- The file name prefix.w- The width.h- The height.immediate- Forces synchronous immediate write to disk.type- The image type, JPG or PNGquality- The quality in the case of JPG in [0..1]- Returns:
- String with the path to the screenshot image file
-
flush
public void flush()
Description copied from interface:IFileImageRendererFlushes the renderer causing the images to be written, if needed.- Specified by:
flushin interfaceIFileImageRenderer
-
-