ctx.quadraticCurveTo(x1, y1, x, y);
从上一点开始绘制一条二次曲线,到(x, y)为止,并且以(x1, y1)作为控制点
ctx.beginPath();
ctx.strokeStyle = 'green';
ctx.lineWidth = 4;
// 起始点
ctx.moveTo(100, 400);//(从上一点)
ctx.quadraticCurveTo(200, 500, 300, 400);
ctx.stroke();
ctx.closePath();