verticalGradient
Android
public fun RemoteBrush.Companion.verticalGradient(
colors: List<RemoteColor>,
startY: RemoteFloat? = null,
endY: RemoteFloat? = null,
tileMode: ComposeTileMode = ComposeTileMode.Clamp,
): RemoteBrush
Creates a vertical gradient with the given colors evenly dispersed within the gradient Ex:
Brush.verticalGradient( listOf(Color.Red.rc, Color.Green.rc, Color.Blue.rc), startY = 0.rf, endY = 100.rf
)
Parameters
| colors | colors to be rendered as part of the gradient |
| startY | Starting y position of the vertical gradient. Defaults to 0 which represents the top of the drawing area |
| endY | Ending y position of the vertical gradient. Defaults to Float.POSITIVE_INFINITY which indicates the bottom of the specified drawing area |
| tileMode | Determines the behavior for how the shader is to fill a region outside its bounds. Defaults to ComposeTileMode.Clamp to repeat the edge pixels |