Are there third-party libs or solutions to capture...
# compose
t
Are there third-party libs or solutions to capture a composable widget (compose multiplatform - not jetpack compose)? For Jetpack Compose I know the excellent lib named ScreenShotBox (smarttoolfactory). But I don't know how to do it in compose multiplatform by Jetbrain.
s
If you meant, render it to bitmap, then JetBrains Compose has built-in tools for that. Check ImageComposeScene. Surprisingly, I didn't find any documentation on it, here are tests to check how to use it https://github.com/JetBrains/compose-multiplatform-core/blob/47f4c4bb46808454de8e83fcaa0f2e86bf1e1d2d/compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/ImageComposeSceneTest.kt#L52
...although it seems that it will only work for the compose desktop. 🤔