Package gaiasky.screenshot
Class ScreenshotsManager
java.lang.Object
gaiasky.screenshot.ScreenshotsManager
- All Implemented Interfaces:
IObserver
public class ScreenshotsManager extends java.lang.Object implements IObserver
-
Field Summary
Fields Modifier and Type Field Description IFileImageRenderer
frameRenderer
IFileImageRenderer
screenshotRenderer
static ScreenshotsManager
system
-
Constructor Summary
Constructors Constructor Description ScreenshotsManager()
-
Method Summary
Modifier and Type Method Description static void
initialize()
void
notify(Events event, java.lang.Object... data)
void
renderCurrentFrameBuffer(java.lang.String folder, java.lang.String file, int w, int h)
void
renderFrame(IMainRenderer mr)
void
renderScreenshot(IMainRenderer mr)
java.lang.String
renderToImage(IMainRenderer mr, ICamera camera, double dt, IPostProcessor.PostProcessBean ppb, int width, int height, java.lang.String folder, java.lang.String filename, IFileImageRenderer renderer, GlobalConf.ImageFormat type, float quality)
Renders the current scene to an image and returns the file name where it has been written toMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
system
-
frameRenderer
-
screenshotRenderer
-
-
Constructor Details
-
ScreenshotsManager
public ScreenshotsManager()
-
-
Method Details
-
initialize
public static void initialize() -
renderFrame
-
renderScreenshot
-
renderCurrentFrameBuffer
public void renderCurrentFrameBuffer(java.lang.String folder, java.lang.String file, int w, int h) -
renderToImage
public java.lang.String renderToImage(IMainRenderer mr, ICamera camera, double dt, IPostProcessor.PostProcessBean ppb, int width, int height, java.lang.String folder, java.lang.String filename, IFileImageRenderer renderer, GlobalConf.ImageFormat type, float quality)Renders the current scene to an image and returns the file name where it has been written to- Parameters:
camera
-width
- The width of the image.height
- The height of the image.folder
- The folder to save the image to.filename
- The file name prefix.renderer
- theIFileImageRenderer
to use.- Returns:
- String with the path to the screenshot image file.
-
notify
-