Hacker News new | comments | ask | show | jobs | submit login

I haven't checked lately but traditionally SVG wasn't available with UIImage yet was with NSImage. This often lead to custom drawing code for vectors on iOS.

I used it only as source for the differently-sized raster images. I sort-of inherited an Android and iOS app at that workplace and just went with what was there. But given that the app used OpenGL I'm not sure there even was a possibility of a vector format to use.

why does OpenGL rule out vector formats? there aren't that many great libraries out there for doing it cross platform, but if you treat them as platform dependencies it should be easier...

you can probably google and find loads, but to get you started a little...

the main one I have experience of is 'cairo' which is quite a powerful library for all kinds of drawing things. there is an android build config (although its a bit old now) here: https://github.com/anoek/android-cairo - it is however not great for iOS or OS X...

i've not used, but heard good things about 'sugar' as well: http://sourceforge.net/projects/libsugar/

It doesn't rule it out per se, but just rendering a texture is much easier, with fewer dependencies. Android toolbar icons are PNG, not SVG. Most renderers have trouble with all but the simplest SVGs (filters, etc. can be a pain in the ass – Inkscape renders them nicely to PNG and I just don't have to worry). There's a trade-off everywhere and all my solution did was take input SVGs and render the PNGs in various sizes which we previously had to maintain by hand. If rendering vector graphics would have been a major competitive advantage to the app I'm sure it would have been considered ;-)

sure. you are right.

i do wonder how long it will take for Apple to come around to mipmapping and trilinear filtering to tackle their very normal problem of multiple resolutions.

it seems to work well enough in all their use cases for the last 20 years or so... :)

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact