function writeLine(cxt,sx,sy,dx,dy,sktyle,lcap,lwidth) {
cxt.beginPath();
cxt.moveTo(sx,sy);
cxt.lineTo(dx,dy);
cxt.strokeStyle = sktyle;
cxt.lineCap = lcap;
cxt.lineWidth = lwidth;
// cxt.closePath(); lineCap无效
cxt.stroke();
}
覆盖了吧