0
假设我有一个SVG文件,我想将它作为一个Ext.draw.Component,如何让我的SVG stop-opacity转换为Ext.draw.Component项目?将SVG转换为Ext.draw.Component渐变
例如,从SVG文件,我会像这样:
<linearGradient ="linearGradient2920">
<stop
id="stop2922"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop2924"
style="stop-color:#000000;stop-opacity:0"
offset="1" />
</linearGradient>
会是什么样子在Ext.draw.Component什么?它会这样翻译吗?
gradients: [{
{
id: 'linearGradient2920',
angle: 100,
stops: {
0: {
color: '#000000',
opacity: 100 //<---Is this even valid??
},
100: {
color: '#000000',
opactiy: 0 //<---Is this even valid??
}
}
}]
stop-opacity是0..1或0%.. 100%,请参阅规格:http://www.w3.org/TR/SVG11/pservers.html#StopOpacityProperty – 2013-03-07 09:50:01