openrndr / org.openrndr.extensions / Screenshots

Screenshots

open class Screenshots : Extension (source)

an extension that takes screenshots when key (default is spacebar) is pressed

Constructors

<init>

an extension that takes screenshots when key (default is spacebar) is pressed

Screenshots()

Properties

afterScreenshot

Event that is triggered after contents have been drawn and the screenshot has been committed to file

val afterScreenshot: Event<ScreenshotEvent>

async

should saving be performed asynchronously?

var async: Boolean

beforeScreenshot

Event that is triggered just before drawing the contents for the screenshot

val beforeScreenshot: Event<ScreenshotEvent>

delayFrames

delays the screenshot for a number of frames. useful to let visuals build up in automated screenshots.

var delayFrames: Int

enabled

open var enabled: Boolean

folder

the folder where the screenshot will be saved to. Default value is "screenshots", saves in current working directory when set to null.

var folder: String?

key

the key that should be pressed to take a screenshot

var key: String

multisample

multisample settings

var multisample: BufferMultisample

quitAfterScreenshot

should the program quit after taking a screenshot?

var quitAfterScreenshot: Boolean

scale

scale can be se to be greater than 1.0 for higher resolution screenshots

var scale: Double

Functions

afterDraw

open fun afterDraw(drawer: Drawer, program: Program): Unit

beforeDraw

open fun beforeDraw(drawer: Drawer, program: Program): Unit

setup

open fun setup(program: Program): Unit

trigger

Trigger screenshot creation

fun trigger(): Unit

Inheritors

SingleScreenshot

specialized version of the Screenshots extension that takes a single screenshot and exits

class SingleScreenshot : Screenshots