我在画布绘图工具中遇到问题。在绘制一条不透明度为40%的线条时,它会像气泡一样(在进攻时带有圆形气泡的线条)。
我正在使用
e.linecap='round';
$("#can").mouseover(function() {
e.lineWidth = $("#bsz").val();//Value from dropdown which is integer
e.lineCap = "round";
});
$("#can").mouseup(function(d) {
if (($("#hdnEraser").val() == "1") && (eraser == true)) {
b = d.pageX - this.offsetLeft;
c = d.pageY - this.offsetTop;
e.clearRect(b, c, $("#esz").val(), $("#esz").val());
}
e.lineCap = "round";
}
$("#can").mousemove(function(d) {
e.beginPath();
e.strokeStyle = $("#bcl").val() + $("#pOpacity").val() + ")";
e.moveTo(d.pageX - this.offsetLeft, d.pageY - this.offsetTop);
e.lineTo(b, c);
e.stroke();
e.closePath();
b = d.pageX - this.offsetLeft;
c = d.pageY - this.offsetTop
e.stroke();
e.lineCap = "round";
});