[这是我之前的问题非常宽的细花括号与 css 或 jquery的后续]
这是一个小提琴绘图花括号:http: //jsfiddle.net/q9Bcb/7/
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var y = canvas.height;
var linelength = ( y - 60 ) / 2;
context.lineWidth = 4;
context.beginPath();
context.moveTo(27,10);
context.arcTo(20,10,20,20,7);
context.lineTo(20,20+linelength);
context.arcTo(20,30+linelength,0,30+linelength,7);
context.arcTo(20,30+linelength,20,40+linelength,7);
context.lineTo(20,y-20);
context.arcTo(20,y-10,30,y-10,7);
context.stroke();
有没有更简单/更好的方法来获得它?