Class ImageRenderer
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.screenshot.ImageRenderer
-
public class ImageRenderer extends java.lang.Object
Utility class to render the current frame buffer to images.
-
-
Constructor Summary
Constructors Constructor Description ImageRenderer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getSequenceNumber()
static java.lang.String
renderToImageGl20(java.lang.String absoluteLocation, java.lang.String baseFileName, int w, int h, GlobalConf.ImageFormat type, float quality)
Saves the current screen as an image to the given directory using the given file name.static com.badlogic.gdx.graphics.Pixmap
renderToPixmap(int w, int h)
static void
resetSequenceNumber()
static java.lang.String
writePixmapToImage(java.lang.String absoluteLocation, java.lang.String baseFileName, com.badlogic.gdx.graphics.Pixmap pixmap, GlobalConf.ImageFormat type, float quality)
-
-
-
Method Detail
-
renderToImageGl20
public static java.lang.String renderToImageGl20(java.lang.String absoluteLocation, java.lang.String baseFileName, int w, int h, GlobalConf.ImageFormat type, float quality)
Saves the current screen as an image to the given directory using the given file name. The sequence number is added automatically to the file name. This method works with OpenGL 2.0- Parameters:
absoluteLocation
- The location folderbaseFileName
- File name without extensionw
- The width of the imageh
- The height of the imagetype
- The formatquality
- Quality, in case of JPG [0..1]
-
renderToPixmap
public static com.badlogic.gdx.graphics.Pixmap renderToPixmap(int w, int h)
-
writePixmapToImage
public static java.lang.String writePixmapToImage(java.lang.String absoluteLocation, java.lang.String baseFileName, com.badlogic.gdx.graphics.Pixmap pixmap, GlobalConf.ImageFormat type, float quality)
-
getSequenceNumber
public static int getSequenceNumber()
-
resetSequenceNumber
public static void resetSequenceNumber()
-
-