Hi guys,
I have a use case where I need to paint a partially filled circle in the device context. The SDK provides 2 methods to draw a filled circle:
dc.fillCircle
dc.fillRoundedRectangle (by providing the radius as half of the rectangles height/width)
I tried the second one hoping that something like this would work:
dc.drawCircle(dc.getWidth()/2, dc.getHeight()/2, 10);
dc.fillRoundedRectangle(dc.getWidth()/2, dc.getHeight()/2, 10, 20, 10);
I expected the circle to be filled till half of the width. The problem is that, as the rectangle has only a width of 10 the radius of 10 is invalid and reduced to 5 automatically, which is not giving me a clear circle.
One way I have in mind would be to use the drawPoint method and calculate all points that I would need to fill inside a circle drawn by drawCircle, but this seems to be a difficult "workaround". Anybody has an idea about a better way to achieve the goal via APIs?
Thanks!
Bye