views:

1087

answers:

2

I'm wondering how vector drawing in Android with the Shape class may resemble another vector drawing standard.

Since Shape is a Drawable, and Drawables are usually defined as XML, it sounds a lot like the vector drawing commands in SVG.

My question is this: Has anybody created an XSLT transformation, or other mechanism, for converting an SVG drawing description into Android Shapes?

+3  A: 

Well, not exactly. But I do have ported libsvg to android, which enables you to load SVG files and plot them to a Canvas.

Please check out:

https://launchpad.net/libsvg-android

Anton P
Web site says "libsvg-android does not have any download files."
Buggieboy
Web site says you have to download using bazaar, simple enough!
Anton P
+2  A: 

The closest thing that I could find was svg4mobile.

While I don't believe that it does transformations to Drawables XML, it does read the svg and make the appropriate calls to the Drawable classes.

Buggieboy