sealed interface RemotePaint


A paint object used for remote drawing operations.

RemotePaint bridges standard platform paint properties with remote-first types like RemoteFloat and RemoteColor, allowing properties to be associated with remote IDs for efficient serialization and dynamic expressions.

This interface can be implemented by classes that wrap standard android.graphics.Paint or androidx.compose.ui.graphics.Paint, or by a pure data implementation like StandardRemotePaint.

Summary

Public companion functions

operator RemotePaint
invoke(init: RemotePaint.() -> Unit)

Creates a new RemotePaint instance using StandardRemotePaint.

Public properties

BlendMode

The BlendMode to use when drawing with this paint.

RemoteColor

The color to use for drawing.

StrokeCap

The StrokeCap to use for the ends of lines and paths.

StrokeJoin

The StrokeJoin to use for the joints of lines and paths.

RemoteFloat

The width of the stroke when style is set to Stroke.

PaintingStyle

The PaintingStyle to use (e.g., Fill, Stroke).

RemoteFloat

The size of the text to draw.

Typeface?

The Typeface to use for drawing text.

Public companion functions

invoke

operator fun invoke(init: RemotePaint.() -> Unit = {}): RemotePaint

Creates a new RemotePaint instance using StandardRemotePaint.

Parameters
init: RemotePaint.() -> Unit = {}

An optional initialization block to configure the paint.

Public properties

blendMode

var blendModeBlendMode

The BlendMode to use when drawing with this paint.

color

var colorRemoteColor

The color to use for drawing.

strokeCap

var strokeCapStrokeCap

The StrokeCap to use for the ends of lines and paths.

strokeJoin

var strokeJoinStrokeJoin

The StrokeJoin to use for the joints of lines and paths.

strokeWidth

var strokeWidthRemoteFloat

The width of the stroke when style is set to Stroke.

style

var stylePaintingStyle

The PaintingStyle to use (e.g., Fill, Stroke).

textSize

var textSizeRemoteFloat

The size of the text to draw.

typeface

var typefaceTypeface?

The Typeface to use for drawing text.