Artboard

An instantiated artboard from a RiveFile.

Can be queried for state machine names, and used to create a Rive composable.

Create an instance of this class using rememberArtboard or Artboard.fromFile. When using the latter, make sure to call close when you are done with the artboard to release its resources.

Parameters

artboardHandle

The handle to the artboard on the command server.

riveWorker

The Rive worker that owns the artboard.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val name: String?

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
Link copied to clipboard

Resets this artboard to its original dimensions.

Link copied to clipboard
fun resizeArtboard(surface: RiveSurface, scaleFactor: Float = 1.0f)

Resizes this artboard to match the dimensions of the given surface, divided by the scale factor.