Class Recorder

  • All Implemented Interfaces:
    RenderLifecycle

    public class Recorder
    extends java.lang.Object
    implements RenderLifecycle
    A class that allows you to record the canvas to a image sequence, can be combined using ffmpeg or something similar

    stores the images in a temporary directory using Files.createTempDirectory(java.nio.file.Path, java.lang.String, java.nio.file.attribute.FileAttribute<?>...)

    • Constructor Detail

      • Recorder

        public Recorder()
    • Method Detail

      • record

        public Recorder record​(java.nio.file.Path path,
                               java.lang.String format)
      • screenshot

        public void screenshot​(java.io.File file,
                               java.lang.String format)
      • renderEnd

        public void renderEnd​(java.awt.Graphics g)
        Description copied from interface: RenderLifecycle
        Runs after everything else; the image in CanvasPanel will not reflect your changes.
        Specified by:
        renderEnd in interface RenderLifecycle
        Parameters:
        g - The graphics context