public class ScreenShotHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.text.DateFormat |
dateFormat |
private static org.apache.logging.log4j.Logger |
logger |
private static java.nio.IntBuffer |
pixelBuffer
A buffer to hold pixel values returned by OpenGL.
|
private static int[] |
pixelValues
The built-up array that contains all the pixel values returned by OpenGL.
|
Constructor and Description |
---|
ScreenShotHelper() |
Modifier and Type | Method and Description |
---|---|
private static java.io.File |
getTimestampedPNGFileForDirectory(java.io.File gameDirectory)
Creates a unique PNG file in the given directory named by a timestamp.
|
static IChatComponent |
saveScreenshot(java.io.File gameDirectory,
int width,
int height,
Framebuffer buffer)
Saves a screenshot in the game directory with a time-stamped filename.
|
static IChatComponent |
saveScreenshot(java.io.File gameDirectory,
java.lang.String screenshotName,
int width,
int height,
Framebuffer buffer)
Saves a screenshot in the game directory with the given file name (or null to generate a time-stamped name).
|
private static final org.apache.logging.log4j.Logger logger
private static final java.text.DateFormat dateFormat
private static java.nio.IntBuffer pixelBuffer
private static int[] pixelValues
public static IChatComponent saveScreenshot(java.io.File gameDirectory, int width, int height, Framebuffer buffer)
public static IChatComponent saveScreenshot(java.io.File gameDirectory, java.lang.String screenshotName, int width, int height, Framebuffer buffer)
private static java.io.File getTimestampedPNGFileForDirectory(java.io.File gameDirectory)