캔버스 선그리기
페이지 정보
작성자 이경환 작성일12-10-09 08:03 조회3,668회 댓글0건본문
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title> 선 그리기 </title>
<script type="text/javascript">
function rect()
{
var canvas = document.getElementById('canvas');
context = canvas.getContext('2d');
<html>
<head>
<meta charset="utf-8" />
<title> 선 그리기 </title>
<script type="text/javascript">
function rect()
{
var canvas = document.getElementById('canvas');
context = canvas.getContext('2d');
context.moveTo(50, 50);
context.lineTo(200, 200);
context.lineWidth = 15;
context.stroke();
}
</script>
</head>
context.lineTo(200, 200);
context.lineWidth = 15;
context.stroke();
}
</script>
</head>
<body onload="rect();">
<canvas id="canvas" width="500" height="400">
canvas 사용하기
</canvas>
</body>
</html>
<canvas id="canvas" width="500" height="400">
canvas 사용하기
</canvas>
</body>
</html>
댓글목록
등록된 댓글이 없습니다.