Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <canvas id="choinka" style="border: 1px solid black;">
- </canvas>
- <script>
- var canvas = document.getElementById("choinka");
- var ctx = canvas.getContext("2d");
- ctx.beginPath();
- ctx.moveTo(85, 100);
- ctx.lineTo(85, 80);
- ctx.lineTo(60, 80);
- ctx.lineTo(90, 35);
- ctx.lineTo(120, 80);
- ctx.lineTo(95, 80);
- ctx.lineTo(95, 100);
- ctx.fill();
- ctx.strokeStyle = "green";
- ctx.stroke();
- ctx.fillStyle = "red";
- ctx.fill();
- ctx.beginPath();
- ctx.moveTo(85, 100);
- ctx.lineTo(85, 40);
- ctx.lineTo(60, 40);
- ctx.lineTo(90, 15);
- ctx.lineTo(120, 40);
- ctx.lineTo(95, 40);
- ctx.lineTo(95, 50);
- ctx.fill();
- ctx.strokeStyle = "green";
- ctx.stroke();
- ctx.fillStyle = "red";
- ctx.fill();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement