HTML 캔버스 beginPath(), closePath()
by JM note
HTML
<canvas id='myCanvas' width='250', height='150'></canvas>
<script>
var ctx = document.getElementById('myCanvas').getContext('2d');
ctx.beginPath();
ctx.moveTo(10,10);
ctx.lineTo(10,100);
ctx.lineTo(200,100);
ctx.closePath();
ctx.fillStyle="rgb(0,0,255)";
ctx.fill();
</script>