I want to know if there is a possibility to use svg graphics with libgdx. I know that Libgdx itself can not handle svgs but is there a possibility with an extension or a method which pre creates PNG's/JPG's out of the SVG's and pass them to Libgdx?
Asked
Active
Viewed 555 times
0
-
Can't you just open the SVG with a software like PhotoShop/Gimp, export as PNG, use the PNGs (within a TextureAtlas)? – TomGrill Games May 05 '17 at 07:35
-
Problem is that the textures are heavy files (about 1440x2565) so that they are sharp :/ – Tim Jansen May 05 '17 at 08:57
1 Answers
1
No, currently not supported.
For simple shape rendering you can use ShapeRenderer. You can't parse .svg
file because of cross platform support.
For android you can use https://github.com/pents90/svg-android
Also check this thread, It may be helpful.

Community
- 1
- 1

Abhishek Aryan
- 19,936
- 8
- 46
- 65
-
-
You can draw .svg file on android using that tool. you can also use [sharp](https://github.com/Pixplicity/sharp) a svg-andorid fork – Abhishek Aryan May 04 '17 at 18:37
-
-
-
-
not sure you may ask on LibGDX forum ? I don't think there is any plan/milestone for the same ? – Abhishek Aryan May 05 '17 at 09:06
-
-
not able to implement due to cross platform support, check this [issue](https://code.google.com/archive/p/libgdx/issues/507) – Abhishek Aryan May 05 '17 at 09:11
-
what is with this, cant I just tuse this? http://stackoverflow.com/questions/30580391/android-studio-1-3-svg-to-png-conversion – Tim Jansen May 05 '17 at 09:38
-
No we can't use, At build time there is conversion from vector images to PNGs. And it's with Android, we need it for LibGDX. – Abhishek Aryan May 05 '17 at 09:45