Class ImageRenderer

java.lang.Object
gaiasky.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

    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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImageRenderer

      public ImageRenderer()
  • Method Details

    • 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 folder
      baseFileName - File name without extension
      w - The width of the image
      h - The height of the image
      type - The format
      quality - 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()