0% found this document useful (0 votes)
11 views1 page

Snow Man

The document describes how to draw a snowman using HTML canvas and JavaScript by drawing different shapes including circles and rectangles.

Uploaded by

bbuli0510
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Snow Man

The document describes how to draw a snowman using HTML canvas and JavaScript by drawing different shapes including circles and rectangles.

Uploaded by

bbuli0510
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body align="center">
<h1>My Snowman</h1>
<canvas id="myCanvas" width="400" height="600" style="border:1px solid
#050303;">
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.arc(200,450,120,0,2*Math.PI);
ctx.stroke();
ctx.beginPath();
ctx.arc(200,255,75,0,2*Math.PI);
ctx.stroke();
ctx.beginPath();
ctx.rect(120, 170, 160, 10);
ctx.stroke();
ctx.beginPath();
ctx.rect(160, 110, 70, 60);
ctx.stroke();
</script>
</body>
</html>

You might also like