Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <canvas id="gc" width="400" height="400"></canvas>
- <script>
- window.onload=function() {
- canv=document.getElementById("gc");
- ctx=canv.getContext("2d");
- widthofCanvas=canv.width;
- heightofCanvas=canv.height;
- ctx.fillStyle="black";
- ctx.fillRect(0,0,widthofCanvas,heightofCanvas);
- ctx.fillStyle="white";
- ctx.fillRect(40,0,40,40);
- ctx.fillRect(120,0,40,40);
- ctx.fillRect(200,0,40,40);
- ctx.fillRect(280,0,40,40);
- ctx.fillRect(360,0,40,40);
- ctx.fillRect(0,40,40,40);
- ctx.fillRect(80,40,40,40);
- ctx.fillRect(160,40,40,40);
- ctx.fillRect(240,40,40,40);
- ctx.fillRect(320,40,40,40);
- ctx.fillRect(40,80,40,40);
- ctx.fillRect(120,80,40,40);
- ctx.fillRect(200,80,40,40);
- ctx.fillRect(280,80,40,40);
- ctx.fillRect(360,80,40,40);
- ctx.fillRect(0,120,40,40);
- ctx.fillRect(80,120,40,40);
- ctx.fillRect(160,120,40,40);
- ctx.fillRect(240,120,40,40);
- ctx.fillRect(320,120,40,40);
- ctx.fillRect(40,160,40,40);
- ctx.fillRect(120,160,40,40);
- ctx.fillRect(200,160,40,40);
- ctx.fillRect(280,160,40,40);
- ctx.fillRect(360,160,40,40);
- ctx.fillRect(0,200,40,40);
- ctx.fillRect(80,200,40,40);
- ctx.fillRect(160,200,40,40);
- ctx.fillRect(240,200,40,40);
- ctx.fillRect(320,200,40,40);
- ctx.fillRect(40,240,40,40);
- ctx.fillRect(120,240,40,40);
- ctx.fillRect(200,240,40,40);
- ctx.fillRect(280,240,40,40);
- ctx.fillRect(360,240,40,40);
- ctx.fillRect(0,280,40,40);
- ctx.fillRect(80,280,40,40);
- ctx.fillRect(160,280,40,40);
- ctx.fillRect(240,280,40,40);
- ctx.fillRect(320,280,40,40);
- ctx.fillRect(40,320,40,40);
- ctx.fillRect(120,320,40,40);
- ctx.fillRect(200,320,40,40);
- ctx.fillRect(280,320,40,40);
- ctx.fillRect(360,320,40,40);
- ctx.fillRect(0,360,40,40);
- ctx.fillRect(80,360,40,40);
- ctx.fillRect(160,360,40,40);
- ctx.fillRect(240,360,40,40);
- ctx.fillRect(320,360,40,40);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement