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

Luca Nicoletti

11/22/2019, 4:07 PM
What’s the corresponding of:
setShadowLayer
in
androidx.ui.graphics.Paint
? Is there a way to draw shadow inside
Draw {}
composable?
y

Yann Badoual

11/22/2019, 6:12 PM
Can't you use
DrawShadow
with your shape?
l

Leland Richardson [G]

11/22/2019, 7:42 PM
depending on what you’re wanting, i think Surface is the easiest way to accomplish a shadow right now, as it uses RenderNode’s elevation directly
i believe this will eventually become an
elevation(…)
modifier but i’m not 100% sure
i don’t know offhand the way to accomplish this directly with canvas
but i suspect it will be slower