Hey guys, is it possible to 'draw' a composeable t...
# compose
t
Hey guys, is it possible to 'draw' a composeable to a ImageBitmap or to make some kind of screenshot of a specific composable? (during runtime not testing) Asking aspecialy for Compose for Desktop but I would say this is a general Compose topic
4
h
This has been discussed many times before. I still haven't found a better alternative to just wrapping the composable in a framelayout and then drawing that said framelayout to a canvas with old APIs.
This of course suffers when the composable contains any
SubcomposeLayout
t
Thanks for the answer sorry that i forgot to specify that I'm using Compose for Desktop and wanted to ask if there was a generalised compose way
d
There's an answer in #compose-desktop .
t
Every answere I found was either for android or for testing purposes. But no solution for drawing components at runtime to a canvas
t
That's also a workaround using the Java Swing API...
d
This is indeed what CfD is based on.
Ohhh, you're not testing.
😅 1
Nvm
t
I specified this now in the questing for clarity 👍