abstract class RemoteBrush


A remote representation of a Brush that can be serialized and reconstructed on a remote surface.

This class provides a mechanism to intercept standard Compose Brush instances, such as linear gradients or solid colors, and convert them into a format suitable for remote rendering.

Summary

Nested types

Public functions

open Unit

Applies this RemoteBrush to a paint.

Public functions

RemoteStateScope.applyTo

open fun RemoteStateScope.applyTo(paint: RemotePaint, size: RemoteSize): Unit

Applies this RemoteBrush to a paint.

Depending on whether the brush is a shader or a solid color, this method updates RemotePaint.shader and RemotePaint.color accordingly.

Parameters
paint: RemotePaint

The paint to apply to.

size: RemoteSize

The size of the area being drawn, used for shader calculation.