Tin Tran
08/11/2021, 2:56 PMColton Idle
08/11/2021, 3:38 PMdrawPath(
path = path,
brush =
Brush.linearGradient(
colorStops =
arrayOf(
0.1f to Color(0x00ff0000),
.2f to Color(0xFFff0000),
.8f to Color(0xFFff0000),
.9f to Color(0x00ff0000),
),
),
Tash
08/11/2021, 9:36 PMsweepGradient
by making sure color stops are passed instead of just a list of colors
Brush.sweepGradient(
0.0f to Color.Red,
0.3f to Color.Green,
1.0f to Color.Blue,
center = Offset(0.0f, 100.0f)
)
Tash
08/11/2021, 9:38 PMsweepGradient
helps especially if you want the leading edge to go back to the starting color when it completes the arcTin Tran
08/12/2021, 6:17 AM