Reputation: 7511
I'm drawing discs that may or may not be complete. I've found that if I'm drawing a value that goes all the way to 2pi, it tends to not be drawn. It seems like somewhere something is simplifying it to 0.
For example (with my arcs that are offset slightly):
ctx.arc(x, y, radius, startAngle + Math.PI/2, resAngle+Math.PI/2);
When the circle should be complete, the end of the circle is not drawn. I have to check for this condition, then add 0.1
in order to get the circle to appear.
Any ideas why?
Upvotes: 1
Views: 152
Reputation: 24627
What steps will reproduce the problem?
Try to draw a circle clockwise, sometimes it won't draw as the delta between the start point and the end point is very small.
A fix is located at the following URL:
Which does the following:
Change line 689 :
if (xStart == xEnd && !aClockwise) {
to
if ((abs(xStart - xEnd) < 10e-8) && !aClockwise) {
References
Upvotes: 1