Drawing arc in excanvas IE8 to 2Pi does not draw arc

153 views Asked by At

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?

1

There are 1 answers

0
Paul Sweatte On

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