|
Drag[en]gine Script Module DragonScript 1.32.1
|
Create screenshots of the render window. More...
Public Member Functions | |
| void | dispose () |
| Dispose of held resources. | |
| Console | getConsole () |
| Console to log finished screenshots to or null to not use. | |
| String | getPath () |
| Directory to store screenshots into including path delimiter. | |
| String | getPrefix () |
| File name prefix. | |
| String | getSuffix () |
| File name suffix including file pattern. | |
| ScreenshotCreator | new () |
| Create screenshot creator. | |
| void | screenshotFinished (String filename) |
| Screenshot finished. | |
| void | setConsole (Console console) |
| Set console to log finished screenshots to or null to not use. | |
| void | setPath (String path) |
| Set directory to store screenshots into. | |
| void | setPrefix (String prefix) |
| Set file name prefix. | |
| void | setSuffix (String suffix) |
| Set file name suffix including file pattern. | |
| void | takeScreenshot () |
| Take a screenshot. | |
| void | update () |
| Update screenshot maker. | |
Public Attributes | |
| CaptureCanvas | pCaptureCanvas |
| Capture canvas for render window. | |
| bool | pCapturePending |
| Capture pending. | |
| Console | pConsole |
| Console to log finished screenshots to or null to not use. | |
| int | pNextNumber |
| String | pPath |
| Directory to store screenshots into including path delimiter. | |
| String | pPrefix |
| File name prefix. | |
| String | pSuffix |
| File name suffix including file pattern. | |
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 | ( | ) |
File name prefix.
Used filename will be
.
| String Dragengine.Utils.ScreenshotCreator.getSuffix | ( | ) |
File name suffix including file pattern.
Used filename will be
.
| 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.
| CaptureCanvas Dragengine.Utils.ScreenshotCreator.pCaptureCanvas |
Capture canvas for render window.
| bool Dragengine.Utils.ScreenshotCreator.pCapturePending |
Capture pending.
| Console Dragengine.Utils.ScreenshotCreator.pConsole |
Console to log finished screenshots to or null to not use.
| int Dragengine.Utils.ScreenshotCreator.pNextNumber |
| String Dragengine.Utils.ScreenshotCreator.pPath |
Directory to store screenshots into including path delimiter.
| String Dragengine.Utils.ScreenshotCreator.pPrefix |
File name prefix.
Used filename will be
.
| String Dragengine.Utils.ScreenshotCreator.pSuffix |
File name suffix including file pattern.
Used filename will be
.