TRY以透明背景繪製並在其上畫線。 但是它繪製了一個黑色的矩形而不是透明的。 如果我將顏色更改爲紅色,它可以正常工作。 所以我想這是透明的問題。Android無法在畫布上繪製透明矩形
drawPoints[currentpoint*4+0] = 0;
drawPoints[currentpoint*4+1] = 10;
drawPoints[currentpoint*4+2] = 20;
drawPoints[currentpoint*4+3] = 40;
Canvas mCanvas = sfh.lockCanvas(new Rect(10,20,50,100));
mCanvas.drawColor(Color.TRANSPARENT);
mCanvas.drawLines(drawPoints,mPaint);
sfh.unlockCanvasAndPost(mCanvas);
爲什麼它繪製黑色?