Package gaiasky.util.screenshot
Class ScreenshotsManager
java.lang.Object
gaiasky.util.screenshot.ScreenshotsManager
- All Implemented Interfaces:
IObserver
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionScreenshotsManager
(GaiaSky gaiaSky, SceneRenderer sceneRenderer, GlobalResources globalResources) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Event notification call.void
renderCurrentFrameBuffer
(String folder, String file, int w, int h) void
renderToImage
(SceneRenderer sceneRenderer, ICamera camera, double dt, IPostProcessor.PostProcessBean ppb, int width, int height, String folder, String filename, IFileImageRenderer imageRenderer, Settings.ImageFormat format, float quality) Renders the current scene to an image and returns the file name where it has been written tovoid
takeScreenshot
(int width, int height, String directory) Posts a runnable that renders a screenshot after the current update-render cycle.
-
Field Details
-
frameRenderer
-
screenshotRenderer
-
-
Constructor Details
-
ScreenshotsManager
public ScreenshotsManager(GaiaSky gaiaSky, SceneRenderer sceneRenderer, GlobalResources globalResources)
-
-
Method Details
-
renderFrame
public void renderFrame() -
renderCurrentFrameBuffer
-
takeScreenshot
Posts a runnable that renders a screenshot after the current update-render cycle.- Parameters:
width
- The width of the screenshot.height
- The height of the screenshot.directory
- The directory to save the screenshot.
-
renderToImage
public String renderToImage(SceneRenderer sceneRenderer, ICamera camera, double dt, IPostProcessor.PostProcessBean ppb, int width, int height, String folder, String filename, IFileImageRenderer imageRenderer, Settings.ImageFormat format, float quality) Renders the current scene to an image and returns the file name where it has been written to- Parameters:
sceneRenderer
- The main renderer to use.camera
- The 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.imageRenderer
- theIFileImageRenderer
to use.- Returns:
- String with the path to the screenshot image file.
-
notify
Description copied from interface:IObserver
Event notification call.
-