PictureRecorder
class PictureRecorder
kotlin.Any | |
↳ | androidx.ui.graphics.PictureRecorder |
Creates a new idle PictureRecorder. To associate it with a Canvas and begin recording, pass this PictureRecorder to the Canvas constructor.
Summary
Public constructors |
|
---|---|
<init>() Creates a new idle PictureRecorder. |
Public methods |
|
---|---|
Picture |
Finishes recording graphical operations. |
Properties |
|
---|---|
Boolean |
Whether this object is currently recording commands. |
Public constructors
<init>
PictureRecorder()
Creates a new idle PictureRecorder. To associate it with a Canvas and begin recording, pass this PictureRecorder to the Canvas constructor.
Public methods
endRecording
fun endRecording(): Picture
Finishes recording graphical operations.
Returns a picture containing the graphical operations that have been recorded thus far. After calling this function, both the picture recorder and the canvas objects are invalid and cannot be used further.
Returns null if the PictureRecorder is not associated with a canvas.
Properties
isRecording
val isRecording: Boolean
Whether this object is currently recording commands.
Specifically, this returns true if a Canvas object has been created to record commands and recording has not yet ended via a call to endRecording, and false if either this PictureRecorder has not yet been associated with a Canvas, or the endRecording method has already been called.