Drag[en]gine Script Module DragonScript
1.21
|
Create screenshots of the render window. More...
Public Member Functions | |
void | dispose () |
Dispose of held resources. More... | |
Console | getConsole () |
Console to log finished screenshots to or null to not use. More... | |
String | getPath () |
Directory to store screenshots into including path delimiter. More... | |
String | getPrefix () |
File name prefix. More... | |
String | getSuffix () |
File name suffix including file pattern. More... | |
ScreenshotCreator | new () |
Create screenshot creator. More... | |
void | screenshotFinished (String filename) |
Screenshot finished. More... | |
void | setConsole (Console console) |
Set console to log finished screenshots to or null to not use. More... | |
void | setPath (String path) |
Set directory to store screenshots into. More... | |
void | setPrefix (String prefix) |
Set file name prefix. More... | |
void | setSuffix (String suffix) |
Set file name suffix including file pattern. More... | |
void | takeScreenshot () |
Take a screenshot. More... | |
void | update () |
Update screenshot maker. More... | |
Create screenshots of the render window.
This class takes care of creating screenshots using CaptureCanvas handling the entire process from triggering a capture to storing the file on disk easily. Call the update method during your game update loop for this class to work.
void Dragengine.Utils.ScreenshotCreator.dispose | ( | ) |
Dispose of held resources.
Call this before exiting your game for proper cleaning up.
Console Dragengine.Utils.ScreenshotCreator.getConsole | ( | ) |
Console to log finished screenshots to or null to not use.
String Dragengine.Utils.ScreenshotCreator.getPath | ( | ) |
Directory to store screenshots into including path delimiter.
String Dragengine.Utils.ScreenshotCreator.getPrefix | ( | ) |
String Dragengine.Utils.ScreenshotCreator.getSuffix | ( | ) |
ScreenshotCreator Dragengine.Utils.ScreenshotCreator.new | ( | ) |
Create screenshot creator.
Default values are:
void Dragengine.Utils.ScreenshotCreator.screenshotFinished | ( | String | filename | ) |
Screenshot finished.
Default implementation logs to the console if not null.
void Dragengine.Utils.ScreenshotCreator.setConsole | ( | Console | console | ) |
Set console to log finished screenshots to or null to not use.
void Dragengine.Utils.ScreenshotCreator.setPath | ( | String | path | ) |
Set directory to store screenshots into.
A trailing path separator will be added if missing.
void Dragengine.Utils.ScreenshotCreator.setPrefix | ( | String | prefix | ) |
Set file name prefix.
Used filename will be
.
void Dragengine.Utils.ScreenshotCreator.setSuffix | ( | String | suffix | ) |
Set file name suffix including file pattern.
Used filename will be
.
void Dragengine.Utils.ScreenshotCreator.takeScreenshot | ( | ) |
Take a screenshot.
The screenshot will be taken during the GraphicSystem.renderWindows(). Once finished it will be saved. If a console is set the finished screenshot is logged to the console. Only one screenshot request can be active at the same time. If a request is still pending the request is ignored.
void Dragengine.Utils.ScreenshotCreator.update | ( | ) |
Update screenshot maker.
Call this during your game loop. Best is to call it towards the end.