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