captureBitmap

fun captureBitmap(onBitmap: (Bitmap?) -> Unit)

Captures the current page to a Bitmap, delivered on the main thread (onBitmap receives null on failure). Off-screen mode returns the next painted frame; Surface mode copies the visible surface.