Interface

RemotePaint

A paint object used for remote drawing operations.

Source set: Android
public 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.

Properties

blendMode

Source set: Android
public var blendMode: BlendMode

The BlendMode to use when drawing with this paint.

style

Source set: Android
public var style: PaintingStyle

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

strokeWidth

Source set: Android
public var strokeWidth: RemoteFloat

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

strokeCap

Source set: Android
public var strokeCap: StrokeCap

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

strokeJoin

Source set: Android
public var strokeJoin: StrokeJoin

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

color

Source set: Android
public var color: RemoteColor

The color to use for drawing.

textSize

Source set: Android
public var textSize: RemoteFloat

The size of the text to draw.

isAntiAlias

Source set: Android
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@set:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public var isAntiAlias: Boolean

Whether anti-aliasing is enabled when drawing with this paint.

filterQuality

Source set: Android
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@set:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public var filterQuality: FilterQuality

The FilterQuality to use when scaling bitmaps.

shader

Source set: Android
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@set:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public var shader: Shader?

The Shader to use for drawing gradients or other patterns.

pathEffect

Source set: Android
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@set:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public var pathEffect: PathEffect?

The PathEffect to apply to the stroke.

colorFilter

Source set: Android
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@set:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public var colorFilter: RemoteColorFilter?

The color filter to apply to the drawn content.

typeface

Source set: Android
public var typeface: Typeface?

The Typeface to use for drawing text.

fontVariationSettings

Source set: Android
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@set:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public var fontVariationSettings: FontVariation.Settings?

The FontVariation.Settings to use for drawing text.

Last updated: