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

Adam Brown

06/27/2022, 9:51 PM
I was looking through some Compose widgets, and couldn't find where they are literally drawing their contents, is there a good example some where? Does it boil down to a canvas object at some point?
f

Francesc

06/27/2022, 10:15 PM
yes, compose draws straight to Canvas using Skia
k

Kirill Grouchnikov

06/27/2022, 10:50 PM
Yes, go down the source code and you'll eventually get to Canvas composables
a

Adam Brown

06/27/2022, 10:52 PM
great, thanks
c

Colton Idle

06/28/2022, 3:41 AM
s

Sean McQuillan [G]

06/28/2022, 11:26 PM
Modifier.drawBehind etc is the most typical in-app usage
Anyway, you won't find anything related to Skia or (platform) Canvas in any of the common directories. To find it you'll need too look in Foo.android.kt files
k

Kirill Grouchnikov

06/28/2022, 11:35 PM
The Canvas composables will be in the common directories though
a

Adam Brown

07/02/2022, 1:59 AM
awesome, thanks for the info! I feel much more comfortable with things when I see how they work all the way down to the pixels 😛
c

Colton Idle

07/02/2022, 6:45 PM
write up a blog post. id read about it. 😄
😇 1
118 Views