Package paintingcanvas.extensions
Class Recorder
- java.lang.Object
-
- paintingcanvas.extensions.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 similarstores the images in a temporary directory using
Files.createTempDirectory(java.nio.file.Path, java.lang.String, java.nio.file.attribute.FileAttribute<?>...)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface paintingcanvas.canvas.RenderLifecycle
RenderLifecycle.AntiAliasingLifecycle, RenderLifecycle.CenteringLifecycle, RenderLifecycle.ResizeListener
-
-
Constructor Summary
Constructors Constructor Description Recorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Recorder
attach()
Recorder
record(java.nio.file.Path path, java.lang.String format)
void
renderEnd(java.awt.Graphics g)
Runs after everything else; theimage
inCanvasPanel
will not reflect your changes.void
screenshot(java.io.File file, java.lang.String format)
Recorder
stop()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface paintingcanvas.canvas.RenderLifecycle
Modifier and Type Method Description default void
onResize(CanvasPanel canvas, java.awt.event.ComponentEvent e)
default void
postRender(java.awt.Graphics g)
Runs after everything else; theimage
inCanvasPanel
will reflect your changes.default void
preRender(java.awt.Graphics g)
Runs before everything else; theimage
inCanvasPanel
will reflect your changes.default void
renderEnd(java.awt.Graphics g)
Runs after everything else; theimage
inCanvasPanel
will not reflect your changes.default void
renderStart(java.awt.Graphics g)
Runs before everything else; theimage
inCanvasPanel
will not reflect your changes.
-
-
-
-
Method Detail
-
attach
public Recorder attach()
-
record
public Recorder record(java.nio.file.Path path, java.lang.String format)
-
stop
public Recorder stop()
-
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; theimage
inCanvasPanel
will not reflect your changes.- Specified by:
renderEnd
in interfaceRenderLifecycle
- Parameters:
g
- The graphics context
-
-