renderInto

fun renderInto(bitmap: Bitmap, artboard: Artboard, stateMachine: StateMachine, fit: Fit = RenderingDefaults.defaultFit(), clearColor: Int = RenderingDefaults.CLEAR_COLOR): Bitmap

Synchronously renders into bitmap.

Return

The same bitmap instance after rendering.

Parameters

bitmap

Destination bitmap. Must match this buffer size and use ARGB_8888.

artboard

Artboard to render.

stateMachine

State machine to render.

fit

Fit mode to use while rendering.

clearColor

Clear color used before drawing.

Throws

If bitmap does not match this buffer's size/config, if artboard or stateMachine are not owned by this buffer's worker, or if stateMachine was not created from artboard.

If this buffer's surface has been closed or the worker has been released.

If the native draw-to-buffer operation fails.