Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <head>
- <meta charset="utf-8">
- <title>Canvas</title>
- <script>
- function rysuj(){
- var k =canvas=document.getElementById("canvas");
- var k =canvas.getContext("2d");
- k.beginPath();
- k.moveTo(50,50);
- k.lineTo(200,90);
- k.lineTo(80,130);
- k.lineTo(50,50);
- k.fillStyle='red';
- k.fill();
- k.beginPath();
- k.arc(200, 150, 20, 0*Math.PI , 2*Math.PI, false);
- k.fillStyle='green';
- k.fill();
- }
- </script>
- </head>
- <body onload="rysuj();">
- <canvas id="canvas" width="300" height="200" style="border: 1px solid black;">
- </canvas>
- <br>
- <canvas id="podpis" width="300" height="50">
- </canvas>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement