Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <canvas id="myCanvas" width="700" height="700"></canvas>
- <script>
- var c=document.getElementById("myCanvas");
- var context=c.getContext("2d");
- context.fillStyle = "green";
- context.strokeStyle = "yellow";
- context.beginPath();
- context.moveTo(10, 10);
- context.lineTo(10, 100);
- context.lineTo(100, 100);
- context.lineTo(10, 10);
- context.fill();
- context.stroke();
- context.closePath();
- </script>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement