function drawmoon(ctx, d) {
ctx.beginPath();
ctx.arc(0, 0, 1, Math.PI/2, 3*Math.PI/2, true);
// moveTo(0, -1);//没有作用,必须接着前一个的点画!!
ctx.arcTo(d, 0, 0, 1, (Math.sqrt(1+d*d)) /d);
ctx.closePath();
}
ctx.beginPath();
ctx.arc(0, 0, 1, Math.PI/2, 3*Math.PI/2, true);
// moveTo(0, -1);//没有作用,必须接着前一个的点画!!
ctx.arcTo(d, 0, 0, 1, (Math.sqrt(1+d*d)) /d);
ctx.closePath();
}
2016-10-12