Render Buffer
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)Content copied to clipboard
Deprecated software-only legacy render buffer.
This type remains for source compatibility and keeps the historical software render->read API. For new usage:
Use SoftwareRenderBuffer for synchronous CPU-backed rendering.
Use HardwareRenderBuffer for asynchronous GPU-backed rendering on API 29+.
See also
Properties
Link copied to clipboard
Surface used for rendering and layout operations such as Artboard.resizeArtboard.
Functions
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.