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

chanjungskim

06/07/2023, 12:28 PM
How can I get Bitmap from composable function?
y

yschimke

06/07/2023, 12:51 PM
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

chanjungskim

06/07/2023, 1:03 PM
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

romainguy

06/07/2023, 3:08 PM
@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

chanjungskim

06/08/2023, 7:49 AM
@romainguy Ah.. I don't like to use AndroidView. Is there any other ways?
r

romainguy

06/08/2023, 2:45 PM
What Yuri linked to
c

chanjungskim

06/09/2023, 3:29 AM
Hmm. when I capture Image, it prints always black with Capturable library.
30 Views