open class RemoteDrawScope : RemoteStateScope

Known direct subclasses
RemoteContentDrawScope

A remote-compatible drawing scope for RemoteCompose that provides access to the content of the component being drawn.


A remote-compatible drawing scope for RemoteCompose. Unlike DrawScope, this class uses remote types consistently and does not attempt to implement the standard DrawScope interface to avoid API incompatibilities.

Summary

Public functions

Unit
drawArc(
    paint: RemotePaint?,
    startAngle: RemoteFloat,
    sweepAngle: RemoteFloat,
    useCenter: Boolean,
    topLeft: RemoteOffset,
    size: RemoteSize
)
Unit
drawRect(paint: RemotePaint?, topLeft: RemoteOffset, size: RemoteSize)
Unit
drawRoundRect(
    paint: RemotePaint?,
    topLeft: RemoteOffset,
    size: RemoteSize,
    cornerRadius: RemoteOffset
)
Unit
drawTextOnCircle(
    text: RemoteString,
    centerX: RemoteFloat,
    centerY: RemoteFloat,
    radius: RemoteFloat,
    startAngle: RemoteFloat,
    warpRadiusOffset: RemoteFloat,
    paint: RemotePaint?
)

Draws text along a circle.

Unit
usePaint(paint: RemotePaint, block: () -> Unit)

Public properties

RemoteOffset

The center of the drawing area as a RemoteOffset.

RemoteFloat

The height of the drawing area as a RemoteFloat.

RemoteSize

The size of the drawing area as a RemoteSize.

RemoteFloat

The width of the drawing area as a RemoteFloat.

Inherited properties

From androidx.compose.remote.creation.compose.state.RemoteStateScope
open LayoutDirection

The LayoutDirection associated with the document being drawn into.

open RemoteDensity

The RemoteDensity associated with the document being drawn into.

Public functions

drawArc

Added in 1.0.0-alpha12
fun drawArc(
    paint: RemotePaint?,
    startAngle: RemoteFloat,
    sweepAngle: RemoteFloat,
    useCenter: Boolean,
    topLeft: RemoteOffset = RemoteOffset.Zero,
    size: RemoteSize = this@RemoteDrawScope.size
): Unit

drawRect

Added in 1.0.0-alpha12
fun drawRect(
    paint: RemotePaint?,
    topLeft: RemoteOffset = RemoteOffset.Zero,
    size: RemoteSize = this@RemoteDrawScope.size
): Unit

drawRoundRect

Added in 1.0.0-alpha12
fun drawRoundRect(
    paint: RemotePaint?,
    topLeft: RemoteOffset = RemoteOffset.Zero,
    size: RemoteSize = this@RemoteDrawScope.size,
    cornerRadius: RemoteOffset = RemoteOffset.Zero
): Unit

drawTextOnCircle

Added in 1.0.0-alpha12
fun drawTextOnCircle(
    text: RemoteString,
    centerX: RemoteFloat,
    centerY: RemoteFloat,
    radius: RemoteFloat,
    startAngle: RemoteFloat,
    warpRadiusOffset: RemoteFloat,
    paint: RemotePaint? = null
): Unit

Draws text along a circle.

Parameters
text: RemoteString

The text to draw.

centerX: RemoteFloat

The x-coordinate of the circle's center.

centerY: RemoteFloat

The y-coordinate of the circle's center.

radius: RemoteFloat

The radius of the circle.

startAngle: RemoteFloat

The starting angle for the text.

warpRadiusOffset: RemoteFloat

the offset of the text from the circle.

paint: RemotePaint? = null

paint of the text

usePaint

Added in 1.0.0-alpha12
fun usePaint(paint: RemotePaint, block: () -> Unit): Unit

Public properties

center

Added in 1.0.0-alpha12
val centerRemoteOffset

The center of the drawing area as a RemoteOffset.

height

Added in 1.0.0-alpha12
val heightRemoteFloat

The height of the drawing area as a RemoteFloat.

size

Added in 1.0.0-alpha12
val sizeRemoteSize

The size of the drawing area as a RemoteSize.

width

Added in 1.0.0-alpha12
val widthRemoteFloat

The width of the drawing area as a RemoteFloat.