How can I get Bitmap from composable function?
# compose
c
How can I get Bitmap from composable function?
y
I'm also curious if this new Compose draw re-targeting feature is the same thing... But haven't tried it. https://cs.android.com/androidx/platform/frameworks/support/+/f60a1149f00d6cc5972e9b[…]androidx/compose/ui/graphics/samples/DrawScopeSample.kt;l=131
c
Hmm I need to create TextField to Bitmap and whenever it types the bitmap should be taken. the captureController doesn't take any keys.
r
@yschimke The retargeting feature can be used to capture a composable as a bitmap yes
Capturable is heavy weight since it creates a new AndroidView
c
@romainguy Ah.. I don't like to use AndroidView. Is there any other ways?
r
What Yuri linked to
c
Hmm. when I capture Image, it prints always black with Capturable library.