capture

fun Node.capture(context: CoroutineContext = Dispatchers.JavaFx, image: WritableImage? = null, configuration: SnapshotParameters.() -> Unit = { }, callback: suspend (SnapshotResult) -> Unit)

Takes a snapshot of this node at the next frame and calls the specified callback method when the image is ready.


fun Scene.capture(context: CoroutineContext = Dispatchers.JavaFx, image: WritableImage? = null, callback: suspend CoroutineScope.(SnapshotResult) -> Unit)

Takes a snapshot of this scene at the next frame and calls the specified callback method when the image is ready.