🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

RemoteDrawScope

A remote-compatible drawing scope for RemoteCompose.

Source set: Android
public open class RemoteDrawScope internal constructor(
    @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public val remoteCanvas: RemoteCanvas
) : RemoteStateScope

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.

Properties

remoteComposeCreationState

Source set: Android
public val remoteComposeCreationState: RemoteComposeCreationState

width

Source set: Android
public val width: RemoteFloat

The width of the drawing area as a RemoteFloat.

height

Source set: Android
public val height: RemoteFloat

The height of the drawing area as a RemoteFloat.

center

Source set: Android
public val center: RemoteOffset

The center of the drawing area as a RemoteOffset.

size

Source set: Android
public val size: RemoteSize

The size of the drawing area as a RemoteSize.

remote

Source set: Android
public val remote: RemoteAccess = RemoteAccess(this)

Access to remote-specific utilities like time and animations.

Functions

usePaint

Source set: Android
public fun usePaint(paint: RemotePaint, block: () -> Unit)

drawRect

Source set: Android
public fun drawRect(
        paint: RemotePaint?,
        topLeft: RemoteOffset = RemoteOffset.Zero,
        size: RemoteSize = [email protected],
    )

Draws a rectangle with the given paint, topLeft offset, and size.

Parameters

paint The RemotePaint to use for drawing the rectangle.
topLeft The top left offset of the rectangle.
size The size of the rectangle.

drawRoundRect

Source set: Android
public fun drawRoundRect(
        paint: RemotePaint?,
        topLeft: RemoteOffset = RemoteOffset.Zero,
        size: RemoteSize = [email protected],
        cornerRadius: RemoteOffset = RemoteOffset.Zero,
    )

drawCircle

Source set: Android
public fun drawCircle(
        paint: RemotePaint?,
        radius: RemoteFloat,
        center: RemoteOffset = [email protected],
    )

Draws a circle.

drawOval

Source set: Android
public fun drawOval(
        paint: RemotePaint?,
        topLeft: RemoteOffset = RemoteOffset.Zero,
        size: RemoteSize = [email protected],
    )

drawArc

Source set: Android
public fun drawArc(
        paint: RemotePaint?,
        startAngle: RemoteFloat,
        sweepAngle: RemoteFloat,
        useCenter: Boolean,
        topLeft: RemoteOffset = RemoteOffset.Zero,
        size: RemoteSize = [email protected],
    )

drawLine

Source set: Android
public fun drawLine(paint: RemotePaint?, start: RemoteOffset, end: RemoteOffset)

Draws a line.

drawTextOnCircle

Source set: Android
public fun drawTextOnCircle(
        text: RemoteString,
        centerX: RemoteFloat,
        centerY: RemoteFloat,
        radius: RemoteFloat,
        startAngle: RemoteFloat,
        warpRadiusOffset: RemoteFloat,
        paint: RemotePaint? = null,
    )

Draws text along a circle.

Parameters

text The text to draw.
centerX The x-coordinate of the circle's center.
centerY The y-coordinate of the circle's center.
radius The radius of the circle.
startAngle The starting angle for the text.
warpRadiusOffset the offset of the text from the circle.
paint paint of the text

Content updated: