Package 

Object RiveFile.Companion

    • Method Detail

      • load

         final RiveFile load(RiveFileSource source, CommandQueue riveWorker)

        Loads a RiveFile from the given source.

        ⚠️ The lifetime of the RiveFile is managed by the caller. Make sure to call close when you are done with the file to release its resources. The returned file holds a reference to riveWorker, so closing it is required before the worker can fully release memory associated with this file.

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

        Parameters:
        source - The source of the Rive file.
        riveWorker - The Rive worker that owns the file.
      • fromSource

        @Deprecated(message = Use load. This result-returning implementation will be removed in 12.0, when load will be renamed to fromSource and return the file directly.) final Result<RiveFile> fromSource(RiveFileSource source, CommandQueue riveWorker)

        Loads a RiveFile from the given source.

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

        Parameters:
        source - The source of the Rive file.
        riveWorker - The Rive worker that owns the file.