Class ScreenshotsManager

java.lang.Object
gaiasky.util.screenshot.ScreenshotsManager
All Implemented Interfaces:
IObserver

public class ScreenshotsManager extends Object implements IObserver
  • Field Details

  • Constructor Details

  • Method Details

    • renderFrame

      public void renderFrame()
    • renderCurrentFrameBuffer

      public void renderCurrentFrameBuffer(String folder, String file, int w, int h)
    • takeScreenshot

      public void takeScreenshot(int width, int height, String directory)
      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 - the IFileImageRenderer to use.
      Returns:
      String with the path to the screenshot image file.
    • notify

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.