Class FrameRecorder
java.lang.Object
org.openpatch.scratch.extensions.recorder.Recorder
org.openpatch.scratch.extensions.recorder.FrameRecorder
The FrameRecorder class extends the Recorder class to provide functionality for saving frames of
an applet as PNG files. It allows saving the current frame with a generated filename based on the
frame number or taking a snapshot with a specified filename.
Usage example:
FrameRecorder recorder = new FrameRecorder("/path/to/output/folder");
recorder.saveFrame(); // Saves the current frame with a generated filename
recorder.snapshot("snapshot.png"); // Saves the current frame as "snapshot.png"
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionFrameRecorder(String outputFolder) Constructs a new FrameRecorder with the specified output folder. -
Method Summary
-
Constructor Details
-
FrameRecorder
Constructs a new FrameRecorder with the specified output folder.- Parameters:
outputFolder- the folder where the recorded frames will be saved
-
-
Method Details
-
saveFrame
-
snapshot
Takes a snapshot of the current frame and saves it to the specified filename.- Parameters:
filename- the name of the file to save the snapshot to
-