-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SVG support for arbitrary data sources #4624
Comments
Yes, we plan to add a such method to the compose core in the future. I mean the method to create a painter from a svg's ByteArray. |
I just found out that you can provide a ByteArray to the new multiplatform Coil AsyncImage and it will work fine.
|
Back to the issue: we don't have a plan to support the SVG rendering on android. It requires to have additional runtime dependency for a SVG processing on the android. |
For non-android targets there will be a method to convert a bytearray to the painter in the |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
The pull request #4605 introduced support for SVG drawables for non android platforms but there still does not seem to be an equivalent, multiplatform variant of the method
public fun loadSvgPainter(inputStream: java.io.InputStream, density: androidx.compose.ui.unit.Density): androidx.compose.ui.graphics.painter.Painter
to create an SVG painter from an arbitrary data source like, e.g., a ByteArray. Currently the support seems to be limited to resources unless I missed something.
The text was updated successfully, but these errors were encountered: