Document The current browser does not support Canvas, can replace the browser a try! window.onload = function(){ ); canvas.width = 800; canvas.height = 800; )){ ); fillMoon(context,) }else{ alert(); } } function dis(x1,y1,x2,y2){ y2)) } fillMoon(cxt,d,x,y,R,rot,fillColor){ cxt.save(); cxt.translate(x,y); cxt.rotate(rot cxt.scale(R,R); pathMoon(cxt,d); cxt.fillStyle ; cxt.fill(); cxt.restore(); } function pathMoon(cxt,d){ cxt.beginPath(); cxt.arc(); moveTo(); cxt.arcTo(d, cxt.closePath(); } function dis(x1,y1,x2,y2){ y2)) }