Package nl.saxion.app

Class AnimatedGifWriter

java.lang.Object
nl.saxion.app.AnimatedGifWriter

public class AnimatedGifWriter extends Object
Create an animated .gif by taking multiple snapshots of a `SaxionApp`, using `addFrame`.
  • Constructor Details

    • AnimatedGifWriter

      public AnimatedGifWriter(String filename, int delay, boolean loop)
      Create a new .gif writer, for taking snapshots of the SaxionApp.
      Parameters:
      filename - Name of the .gif file that will be created.
      delay - Delay between frames in milliseconds.
      loop - Boolean indicating if the animated GIF should loop.
  • Method Details

    • addFrame

      public void addFrame()
      Append the current state of the `SaxionApp` to the GIF as a frame.
    • close

      public void close() throws IOException
      Finish writing the GIF. Any subsequent calls to `addFrame` will be ignored.
      Throws:
      IOException - IOException in case of failure to end the write sequence