SVG Icon woes
Hi friends, once again thanks for all the help over the several threads I've made. This community has given me way too much!
Anyways, I've been having problems creating an icon for as long as I've used Haxeflixel. My problems have ranged from my icon not being recognized and the game using a black square instead, to the icon being a cut off slice of the full size.
I've actually managed to solve these issues once upon a time, but sadly I never quite understood how and now I'm facing the same problems again.
Any clues as to which SVG version should the icons be exported to, or which dimensions, or other secrets I might've missed?
Have you properly listed your icon in the Project.xml? Also I belief it must be in the asset folder.
<icon path="assets/icon.svg" />
More info on the xml found here.
I've never used SVG as an icon, but they should be scale-able,! So size should not matter. Use a ratio of 1:1 for a squared icon.
This is how my project.xml looks like at the moment.
<icon path="assets/icons/icon.svg"/> <icon path="assets/icons/icon-64.png" size="64" /> <icon path="assets/icons/icon-96.png" width="96" height="96" /> <icon path="assets/icons/icon-512.png" size="512" />
From the link you posted, I gather Haxe favors svg over bitmaps so I'm gonna make some tests with my pngs over different platforms and come back with results. I prefer using svg over bitmaps for best quality but I can try seeing how it looks and making some decisions off that.
Not sure if it needs to be on the root assets folder tho
I make my svg icon with Inkscape, 128 x 128 and save as plain svg. I save it to
<icon path="assets/icon.svg" />in project.xml.
I think there was a need to keep it in
assetsand not a sub dir, but I can't remember for sure.
Hope it helps
You would need to convert all your shapes to paths for the best result and remove all effects or filters if there are any, as Lime doesn't support rendering for advanced shapes or filters and the like.