renderToBitmap

suspend fun View.renderToBitmap(views: Views? = this.stage?.views, region: Rectangle? = null, scale: Double = 1.0, outPoint: Ref<Point>? = null, includeBackground: Boolean = false): Bitmap32

Asynchronously renders this View (with the provided views) to a Bitmap32 and returns it. The rendering will happen before the next frame.