2014-12-23 199 views
0

我該如何設置畫布背景?它總是顯示黑色。如果我將fillcolor設置爲填充圓圈,外部仍然是黑色。帆布背景顏色

this.drawArc({ 
    x1 : 10, 
    y1 : 10, 
    x2 : "95%", 
    y2 : "95%", 
    startAngle : -270, 
    endAngle : 90, 
    useCenterLines : false, 
    paint : { 
     type : 0, 
     fillColor : null, 
     strokeColor : "#cccccc", 
     width: 20 
    } 
}); 
畫布對象的

enter image description here

回答

0

背景顏色不是改變屬性。

Android使用它作爲黑色,iOS使用是透明的。

這些是Canvas對象的原生行爲。

0

我認爲繪圖畫布對象

this.drawImage({ 
    image:"imagebg2.png", // image filled by bg color 
    destRect : [0, 0, this.Canvas1.width, this.Canvas1.height] 
}); 

之前最近的溶液使用的drawImage但其呈現的顏色不同