PictureRecorder

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
expect open val isClosed: Boolean

Check if underlying resource is closed.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun beginRecording(bounds: Rect, bbh: BBHFactory? = null): Canvas
fun beginRecording(left: Float, top: Float, right: Float, bottom: Float, bbh: BBHFactory? = null): Canvas

Returns the canvas that records the drawing commands.

Link copied to clipboard
expect open fun close()

Free underlying native resource, peer is useless afterwards.

Link copied to clipboard

Signal that the caller is done recording. This invalidates the canvas returned by .beginRecording/.getRecordingCanvas.

Signal that the caller is done recording, and update the cull rect to use for bounding box hierarchy (BBH) generation. The behavior is the same as calling .finishRecordingAsPicture, except that this method updates the cull rect initially passed into .beginRecording.

fun finishRecordingAsPicture(cullLeft: Float, cullTop: Float, cullRight: Float, cullBottom: Float): Picture

Finalizes the recording of the drawing commands and creates an immutable picture object that encapsulates the recorded content. The cull rect provided defines the boundaries for the recorded content and can be used for bounding box hierarchy (BBH) generation and subsequent culling operations. After this call, the canvas returned by any beginRecording or getRecordingCanvas method becomes invalid.

Link copied to clipboard
expect open override fun toString(): String