---
title: "RemoteCanvas"
description: "A Composable that provides a [RemoteDrawScope] for drawing operations in RemoteCompose."
type: "composable"
---
## API Reference

### RemoteCanvas

> Source set: Android

```kotlin
@Composable
public fun RemoteCanvas(
    modifier: RemoteModifier = RemoteModifier,
    content: RemoteDrawScope.() -> Unit,
)
```

A Composable that provides a [RemoteDrawScope](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteDrawScope/api) for drawing operations in RemoteCompose.

#### Parameters

| | |
| --- | --- |
| modifier | The [RemoteModifier](/jetpack-compose/androidx.compose.remote/remote-creation-compose/interfaces/RemoteModifier) to apply to this layout. |
| content | The drawing commands to be executed on the remote canvas via [RemoteDrawScope](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteDrawScope). |

## Code Examples

### RemoteCanvasSample

```kotlin
@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteCanvasSample() {
    RemoteCanvas(modifier = RemoteModifier.size(100.rdp)) {
        val paint = RemotePaint().apply { color = Color.Red.rc }
        drawCircle(paint = paint, radius = 50.rf)
    }
}
```

### RemoteCanvasAnimationSample

```kotlin
@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteCanvasAnimationSample() {
    // This sample uses ContinuousSec which might be restricted in some contexts,
    // but demonstrates how to create time-based animations on the remote canvas.
    RemoteCanvas(modifier = RemoteModifier.size(100.rdp)) {
        val paint = RemotePaint().apply { color = Color.Blue.rc }

        val time = remote.time.ContinuousSec()

        // Oscillate radius between 10 and 40
        val sineValue = sin(time)
        val normalizedSine = (sineValue + 1f.rf) / 2f.rf
        val radius = 10f.rf + 30f.rf * normalizedSine

        drawCircle(paint = paint, radius = radius)
    }
}
```
