将一个圆分成Titanium中的段

时间:2013-06-08 13:41:31

标签: titanium line geometry

我使用以下代码在Titanium中绘制了一个圆圈。

var wheelTop = Ti.UI.createImageView({
        width: 100,
        height: 100,
        borderRadius: 50,
        borderColor: '#1a0033',
        backgroundColor: '#8400ff'
});

现在,我想将此圈分成24个段,并为每个段创建一个单独的属性。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

也许您应该使用包含HTML画布的WebView。

我还读到使用SVG的Raphaëljslib(http://raphaeljs.com/)可以包含在Titanium中:

http://developer.appcelerator.com/question/15861/using-raphaeljs-js-drawing-library-in-a-mobile-app

如果无法选择webview,您可以查看市场中的一些模块: https://marketplace.appcelerator.com/apps/4967?1054292716 https://marketplace.appcelerator.com/apps/5941?416198363