Package 

Object Artboard.Companion

    • Method Summary

      Modifier and Type Method Description
      final Artboard create(RiveFile file, String artboardName) Creates a new Artboard and suspends until its Rive worker confirms creation.
      final Artboard fromFile(RiveFile file, String artboardName) Creates a new Artboard.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

         final Artboard create(RiveFile file, String artboardName)

        Creates a new Artboard and suspends until its Rive worker confirms creation.

        This is the replacement for fromFile. Its temporary name avoids a source-incompatible overload; it will be renamed to fromFile in 12.0 when the unconfirmed API is removed.

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

        Parameters:
        file - The RiveFile to instantiate the artboard from.
        artboardName - The name of the artboard to load.
      • fromFile

        @Deprecated(message = Use create. This unconfirmed implementation will be removed in 12.0, when create will be renamed to fromFile as a suspending API.) final Artboard fromFile(RiveFile file, String artboardName)

        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.

        Parameters:
        file - The RiveFile to instantiate the artboard from.
        artboardName - The name of the artboard to load.