isolatedWithTarget

fun Drawer.isolatedWithTarget(target: RenderTarget, function: Drawer.() -> Unit)(source)

Executes the given function within an isolated drawing context bound to the specified render target.

This method binds the provided render target, executes the function within an isolated context, and then ensures that the render target is unbound after execution.

Parameters

target

The render target to bind during the execution of the provided function.

function

The drawing function to execute within the isolated context.

See also