0
我有問題。我需要在畫布上繪製另一個邊框。如果我試試這個:在畫布上繪製另一個邊框
c2.beginPath();
c2.moveTo(0, 0);
c2.lineTo(0, 100);
c2.lineWidth = Number(sw) + 6;
c2.strokeStyle = "red";
c2.stroke();
c2.lineTo(100, 100);
c2.lineWidth = Number(sw) + 6;
c2.strokeStyle = "#00ec11";
c2.stroke();
c2.lineTo(0, 100);
c2.lineWidth = Number(ss) + 6;
c2.strokeStyle = "red";
c2.stroke();
c2.closePath();
c2.lineWidth = Number(sw) + 6;
c2.strokeStyle = "#00ec11";
c2.stroke();
c2.fill();
它不工作,因爲所有行都有綠色邊框。你可以幫我嗎?
---編輯: 我可以; t關閉補丁時,關閉我的線條杆這條線畫的形狀。當我關閉修補程序時,我的形狀不正確。梅比的另一個想法?