Core code:
$(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();
})
closePath(); Close the path
The picture below is one that uses, close, One is useless:
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn