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

RemoteBrush

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

Source set: Android
public abstract class RemoteBrush internal constructor()

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.

Properties

intrinsicSize

Source set: Android
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public val intrinsicSize: Size = Size.Unspecified

Return the intrinsic size of the RemoteBrush. If the there is no intrinsic size (i.e. filling bounds with an arbitrary color) return Size.Unspecified. If there is no intrinsic size in a single dimension, return Size with Float.NaN in the desired dimension.

Functions

applyTo

Source set: Android
public abstract fun RemoteStateScope.applyTo(paint: RemotePaint, size: RemoteSize)

Applies this RemoteBrush to a paint.

Parameters

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

Members

Companion

Source set: Android
public companion object

Content updated: