https://kotlinlang.org logo
#compose
Title
# compose
d

Dieter Holz

11/19/2020, 12:55 PM
In Canvas: How can I “add” an “InnerShadow” and/or a “DropShadow” to e.g. a circle with a linearGradient
n

Nader Jawad

11/21/2020, 3:54 AM
You can use the Modifier.drawShadow api to add a drop shadow to a composable
d

Dieter Holz

11/21/2020, 3:24 PM
I always thought that’s for the whole Canvas only. Does it really help to add a shadow to the elements drawn inside the Canvas?
n

Nader Jawad

11/21/2020, 3:28 PM
You can use
Modifier.drawShadow().drawBehind()
to apply a shadow to the composable and issue drawing commands to the canvas to draw a circle with a gradient
2 Views