In my Custom View, I draw multiple filled Arcs like this:
canvas.drawArc(oval, startAngle, sweepAngle, true, sectorPaint);
Now, I want to draw an icon on the center of the Arc. I started with this:
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.my_icon);
canvas.drawBitmap(bitmap, pointX, pointY, null); //pointX & pointY ??
However, I don’t know what should I set for pointX and pointY. Here is the data I have:
- Oval center coordinates and radius.
- startAngle and sweepAngle (and therefore, endAngle can be derived)
Is there a way to know the values pointX and pointY giving those inputs?
Edit: an illustration sketch:

This answer helped me a lot after some adjustments: