Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body onload="draw();">
- <canvas id="canvas" width="2000" height="2000" style="1px background:black"></canvas>
- </body>
- </html>
- <script>
- function draw() {
- var ee=prompt('Enter Level:');
- ctx=document.getElementById('canvas').getContext('2d');
- var img = new Image();
- img.onload = function(){
- ctx.scale(2,2);
- ctx.drawImage(img,0,0);
- ctx.beginPath();
- ctx.strokeStyle='darkred';
- ctx.moveTo(ee,115);
- ctx.lineTo(115,15);
- ctx.stroke();
- };
- img.src='https://mdn.mozillademos.org/files/5395/backdrop.png';
- }
- </script>
Add Comment
Please, Sign In to add comment