Android drawCircle's are not always 360 degrees

Posted by user329999 on Stack Overflow See other posts from Stack Overflow or by user329999
Published on 2010-05-06T22:08:44Z Indexed on 2010/05/07 17:28 UTC
Read the original article Hit count: 731

Filed under:
|
|

When I call drawCircle (ex. canvas.drawCircle(x, y, r, mPaint);) and I use Paint Style STROKE to initialize param #4 mPaint, the result doesn't quite make a full 360 degree (2*PI radian) circle in all cases. Sometimes you get a full circle (as I would expect) and sometimes only an arc.

Does someone have an idea what would cause this to happen?

I don't know what cases work and which don't (yet). I've noticed the ones that don't work seem to be the larger circles I'm drawing (>100.0 radius). Could be size related. I am using floating point for x, y and r. I could try rounding to the nearest int when in the drawing code.

© Stack Overflow or respective owner

Related posts about graphics

Related posts about beginner