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 instantiated via the RemotePaint factory function, or converted from platform paints using platform-specific extension functions.

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.

FontVariation.Settings?

The FontVariation.Settings to use for drawing text.

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.

RemoteTypeface?

The RemoteTypeface to use for drawing text.

Public companion functions

invoke

Added in 1.0.0-alpha21
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 blendMode: BlendMode

The BlendMode to use when drawing with this paint.

color

Added in 1.0.0-alpha21
var color: RemoteColor

The color to use for drawing.

fontVariationSettings

Added in 1.0.0-alpha21
var fontVariationSettings: FontVariation.Settings?

The FontVariation.Settings to use for drawing text.

strokeCap

var strokeCap: StrokeCap

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

strokeJoin

var strokeJoin: StrokeJoin

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

strokeWidth

Added in 1.0.0-alpha21
var strokeWidth: RemoteFloat

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

style

var style: PaintingStyle

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

textSize

Added in 1.0.0-alpha21
var textSize: RemoteFloat

The size of the text to draw.

typeface

Added in 1.0.0-alpha21
var typeface: RemoteTypeface?

The RemoteTypeface to use for drawing text.