ShaderBrush

Known direct subclasses
LinearGradient

Brush implementation used to apply a linear gradient on a given Paint

RadialGradient

Brush implementation used to apply a radial gradient on a given Paint

SweepGradient

Brush implementation used to apply a sweep gradient on a given Paint


Brush implementation that wraps and applies a the provided shader to a Paint The shader can be lazily created based on a given size, or provided directly as a parameter

Summary

Public constructors

Cmn

Public functions

final Unit
applyTo(size: Size, p: Paint, alpha: Float)
Cmn
abstract Shader
Cmn

Inherited properties

From androidx.compose.ui.graphics.Brush
open Size

Return the intrinsic size of the Brush.

Cmn

Public constructors

ShaderBrush

ShaderBrush()

Public functions

applyTo

final fun applyTo(size: Size, p: Paint, alpha: Float): Unit

createShader

abstract fun createShader(size: Size): Shader