问题描述
我想知道在 Android 中使用 Shape
类进行矢量绘制与另一个矢量绘制标准有何相似之处.
I'm wondering how vector drawing in Android with the Shape
class may resemble another vector drawing standard.
由于Shape
是一个Drawable
,而Drawables通常被定义为XML,这听起来很像SVG中的矢量绘图命令.
Since Shape
is a Drawable
, and Drawables are usually defined as XML, it sounds a lot like the vector drawing commands in SVG.
我的问题是:是否有人创建了 XSLT 转换或其他机制来将 SVG 绘图描述转换为 Android 形状?
My question is this: Has anybody created an XSLT transformation, or other mechanism, for converting an SVG drawing description into Android Shapes?
推荐答案
我能找到的最接近的东西是 svg4mobile.
The closest thing that I could find was svg4mobile.
虽然我不相信它会对 Drawables XML 进行转换,但它会读取 svg 并对 Drawable 类进行适当的调用.
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.
这篇关于SVG 到 Android 形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!