Composable Function

RemoteCanvas

A Composable that provides a RemoteDrawScope for drawing operations in RemoteCompose.

RemoteCanvas

Source set: JvmAndAndroid
@Composable
public fun RemoteCanvas(
    modifier: RemoteModifier = RemoteModifier,
    onDraw: RemoteDrawScope.() -> Unit,
)

A Composable that provides a RemoteDrawScope for drawing operations in RemoteCompose.

Basic example of drawing shapes on a RemoteCanvas:

Example of animating canvas drawing with continuous remote time variables:

Parameters

modifier The RemoteModifier to apply to this layout.
onDraw The drawing commands to be executed on the remote canvas via RemoteDrawScope.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: