Class GifRecorder

java.lang.Object
org.openpatch.scratch.recorder.GifRecorder

public class GifRecorder extends Object
Records the stage as an animated GIF: every second frame of game time (30 a second), at stage size, texts and the UI included.
GifRecorder recorder = new GifRecorder("recording.gif");
recorder.start();
// … later
recorder.stop();
  • Constructor Details

    • GifRecorder

      public GifRecorder(String path)
      Parameters:
      path - the GIF file to write; .gif is added when missing
  • Method Details

    • start

      public void start()
      Starts recording from the next frame on.
    • stop

      public void stop()
      Stops recording and finishes the file.
    • snapshot

      public void snapshot()
      Saves the next frame as a GIF of one frame.