RenderBuffer

class RenderBuffer(val width: Int, val height: Int, riveWorker: RiveWorker) : CheckableAutoCloseable

Deprecated

RenderBuffer is deprecated. Use SoftwareRenderBuffer for software rendering or HardwareRenderBuffer for hardware rendering.

Replace with

SoftwareRenderBuffer(width, height, riveWorker)

Deprecated software-only legacy render buffer.

This type remains for source compatibility and keeps the historical software render->read API. For new usage:

See also

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, riveWorker: RiveWorker)

Properties

Link copied to clipboard
open override val closed: Boolean

Whether this resource has been closed.

Link copied to clipboard
val height: Int
Link copied to clipboard

Surface used for rendering and layout operations such as Artboard.resizeArtboard.

Link copied to clipboard
val width: Int

Functions

Link copied to clipboard
open override fun close()

Closes this resource, releasing any underlying resources.

Link copied to clipboard
fun copyInto(bitmap: Bitmap): Bitmap

Copies this buffer's latest rendered software pixels into bitmap.

Link copied to clipboard
fun render(artboard: Artboard, stateMachine: StateMachine, fit: Fit = RenderingDefaults.defaultFit(), clearColor: Int = RenderingDefaults.CLEAR_COLOR): RenderBuffer

Synchronously renders the artboard/state-machine into this software buffer.

Link copied to clipboard
fun snapshot(artboard: Artboard, stateMachine: StateMachine, fit: Fit = RenderingDefaults.defaultFit(), clearColor: Int = RenderingDefaults.CLEAR_COLOR): RenderBuffer

Backward-compatible alias for render.

Link copied to clipboard

Returns a new ARGB_8888 bitmap containing the latest rendered software pixels.