댓글 : html5 캔버스는 선 클로스 주 () 예제 코드, 필요한 친구를 참조 할 수 있습니다.
핵심 코드 :$ (function () {
var can = $ ( "#can"). get (0);
var txi = can.getContext ( "2d");
txi.beginpath ();
TXI.MOVETO (105,105);
TXI.LINETO (105,45);
TXI.LINETO (45,105);
txi.closepath ();
txi.stroke ();
txi.beginpath ();
TXI.MOVETO (25,25);
TXI.LINETO (100,25);
TXI.LINETO (25,100);
txi.stroke ();
})
<canvas> </canvas>
ClosePath (); ClosePath (); 경로를 닫습니다
다음 그림은 사용 된 하나의 사진, 닫히고 다른 그림은 쓸모가 없습니다.