5 <canvas id=
"mycanvas" width=
"600" height=
"400"></canvas>
8 testRunner
.dumpAsTextWithPixelResults();
10 var canvas
= document
.getElementById('mycanvas');
11 var ctx
= canvas
.getContext('2d');
12 ctx
.fillStyle
= 'rgba(0, 0, 0, 0.5)';
16 -123.7, -2.3, -2, -1, -0.3, -0.000001, 0, 0.000001, 0.3, 0.7,
17 1, 1.3, 1.5, 1.7, 1.99999, 2, 2.00001, 2.3, 4.3, 3934723942837.3
19 for (var i
= 0; i
< sweepAngles
.length
; i
++) {
20 sweepAngles
[i
] = sweepAngles
[i
] * Math
.PI
;
26 for (var i
= 0; i
< startAngles
.length
; i
++) {
27 startAngles
[i
] = startAngles
[i
] * Math
.PI
;
31 var anticlockwise
= false;
33 for (var i
= 0; i
< startAngles
.length
* 2; i
++) {
34 if (i
== startAngles
.length
) {
38 startAngle
= startAngles
[i
% startAngles
.length
] * sign
;
40 for (var j
= 0; j
< sweepAngles
.length
; j
++) {
44 ctx
.arc(18, 15, 10, startAngle
, startAngle
+ (sweepAngles
[j
] * sign
), anticlockwise
);