Hello, is there a way to convert `SVG` to `ImageV...
# compose
r
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
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
y
👍 2
👍🏾 1
a
@Raphael TEYSSANDIER I'm late to the party, but just saw this. I'm the creator of composables.com Do you remember what exactly was not working for you, so that I can fix it?
r
If I remember correctly, it was generating the ImageVector. But when using it, it wasn't displaying anything. Even with tint
a
Gotcha. That is probably fixed already, since a lot of converter bugs were resolved over time. If you spot any other ones that don't work, let me know so that I can have a look for you
👀 1
r
Sure, thanks !
🙏 1
674 Views