Artboard

class Artboard(unsafeCppPointer: Long, fileLock: ReentrantLock, file: File? = null) : NativeObject

Artboards as designed in the Rive animation editor.

Artboards provide access to available animations, and some basic properties. You can draw artboards using a Renderer that is tied to a canvas.

Parameters

unsafeCppPointer

Pointer to the C++ counterpart.

fileLock

Lock shared by the File and native graph this artboard belongs to.

file

The File that created this artboard. Used only to promote an artboard to a bindable artboard.

Constructors

Link copied to clipboard
constructor(unsafeCppPointer: Long, fileLock: ReentrantLock, file: File? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Getter/Setter for the underlying C++ pointer value.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get the first state machine of the artboard.

Link copied to clipboard

Whether this objects underlying pointer is still valid.

Link copied to clipboard

The height of the artboard.

Link copied to clipboard

Get the name of the Artboard.

Link copied to clipboard
open val refCount: Int
Link copied to clipboard
override var refs: AtomicInteger
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The ViewModelInstance assigned to this artboard. Once assigned, modifications to the properties of the instance will be reflected in the bindings of this artboard.

Link copied to clipboard

Get and set the volume of the artboard.

Link copied to clipboard

The width of the artboard.

Functions

Link copied to clipboard
open override fun acquire(): Int

Increments the references for this counter. Cannot be used for initialization - use refs.incrementAndGet instead.

Link copied to clipboard
fun advance(elapsedTime: Float): Boolean

Advancing the artboard:

Link copied to clipboard

Get the animation at a given 0-based index in the Artboard.

Get the animation with a given name in the Artboard.

Link copied to clipboard
open external override fun cppDelete(pointer: Long)
Link copied to clipboard
fun draw(rendererAddress: Long)

Draw the the artboard to the renderer.

fun draw(rendererAddress: Long, fit: Fit, alignment: Alignment, scaleFactor: Float = 1.0f)

Draw the the artboard to the renderer. Also align the artboard to the render surface.

Link copied to clipboard

Get the text value for a text run named name.

fun getTextRunValue(name: String, path: String): String?

Get the text value for a text run named name on the nested artboard represented at path.

Link copied to clipboard
fun input(name: String, path: String): SMIInput

Get the input instance with a given name on the nested artboard represented at path.

Link copied to clipboard
open override fun release(): Int

Decrements the reference counter.

Link copied to clipboard

Reset the artboard size to its defaults.

Link copied to clipboard
fun setTextRunValue(name: String, textValue: String)

Set the text value for a text run named name to textValue.

fun setTextRunValue(name: String, textValue: String, path: String)

Set the text value for a text run named name to textValue on the nested artboard represented at path.

Link copied to clipboard

Get the state machine at a given 0-based index in the artboard.

Get the state machine with a given name in the artboard.

Link copied to clipboard

Get a RiveTextValueRun with a given name in the artboard.

Get a RiveTextValueRun with a given name on the nested artboard represented at path.