Class

RemoteShaderBrush

Brush that applies a shader to the drawn area.

Source set: JvmAndAndroid
public abstract class RemoteShaderBrush internal constructor() : RemoteBrush()

Brush that applies a shader to the drawn area.

Base class for shader-based brushes such as gradients and image textures.

Functions

applyTo

Source set: JvmAndAndroid
override fun RemoteStateScope.applyTo(paint: RemotePaint, size: RemoteSize)

applyTo

Source set: JvmAndAndroid
public open fun RemoteStateScope.applyTo(
        paint: RemotePaint,
        size: RemoteSize,
        matrix3x3: RemoteMatrix3x3,
    )

Applies this RemoteShaderBrush to a paint with a given size and matrix3x3 transformation.

Example of applying a rotated gradient shader brush to a RemotePaint:

Parameters

paint The paint to apply the shader to.
size The size of the area being drawn.
matrix3x3 The 3x3 matrix to apply to the shader.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: