canvas曲线

var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.beginPath();
context.moveTo(188, 150);
context.quadraticCurveTo(288, 0, 388, 150);
context.lineWidth = 10;
// line color
context.strokeStyle = 'orange';
context.stroke();

moveTo(开始点)

quadraticCurveTo(控制点,结束点)

 

posted @ 2015-05-04 23:05  百里水上  阅读(149)  评论(0编辑  收藏  举报