在我的自定義視圖,我繪製多個充滿Arc
就像這樣:在Arc中心繪製位圖?
canvas.drawArc(oval, startAngle, sweepAngle, true, sectorPaint);
現在,我想在圓弧的圓心繪製圖標。我開始與此:
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.my_icon);
canvas.drawBitmap(bitmap, pointX, pointY, null); //pointX & pointY ??
不過,我不知道我應該爲pointX
和pointY
設置。這裏是我擁有的數據:
- 橢圓圓心座標和半徑。
- 由startAngle和sweepAngle(因此,endAngle可以得出)
有沒有辦法知道價值pointX
和pointY
給那些投入?
編輯:插圖草圖:
你可以把屏幕截圖也想實現 –
@SunnyKumarAditya編輯與草圖什麼。請看看。 – iTurki