Skip to content

Instantly share code, notes, and snippets.

@balaam
Created September 16, 2022 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balaam/884bab1383f92d8c0010101b8f6579dc to your computer and use it in GitHub Desktop.
Save balaam/884bab1383f92d8c0010101b8f6579dc to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script>
function isBitOn(number, index) {
return Boolean(number & (1 << index));
}
window.onload = function() {
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(20, 10, 150, 100);
}
</script>
</head>
<body>
<p>When the Apple II came out, a new mode had been added for 280×192 high-resolution graphics. 280*2 = 560, 192*2 = 384.</p>
<canvas id="canvas" width="560" height="384" style="border:1px solid #000000;">
Your browser does not support the HTML canvas tag.
</canvas>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment