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

Raphael TEYSSANDIER

10/27/2023, 6:16 PM
Hello, is there a way to convert
SVG
to
ImageVector
for compose multiplatform ? I try using this https://www.composables.com/svgtocompose. But it doesn’t work, and material icon works.
t

Travis Griggs

10/27/2023, 6:32 PM
I've asked this question repeatedly for the last 8 years. Every since I was able to use an Inkscape batch script to convert any SVG to a PDF asset in XCode that Just Worked(tm) in iOS. I've never gotten a real positive answer. Various sort of "kind ofs". You can use the import button in Android Studio to turn some SVGs into Drawables. You can't make that part of a build pipeline though, or do mass groups at once. Many SVG assets are pretty simple, so it usually works. But anything complicated (gradients, variations on the fill-stroke order, clips, etc) and it starts to be a less than faithful conversion
I'd love to be set straight by someone more up to date and informed
6 Views