fromFile

fun fromFile(file: RiveFile, artboardName: String? = null): Artboard

Creates a new Artboard.

⚠️ The lifetime of the returned artboard is managed by the caller. Make sure to call close when you are done with it to release its resources.

Return

The created artboard.

Parameters

file

The RiveFile to instantiate the artboard from.

artboardName

The name of the artboard to load. If null, the default artboard will be loaded.