Skip to content

Instantly share code, notes, and snippets.

@andyfriesen
Created March 21, 2018 17:57
Show Gist options
  • Save andyfriesen/0b11736f0284969d63e881a1dba98e82 to your computer and use it in GitHub Desktop.
Save andyfriesen/0b11736f0284969d63e881a1dba98e82 to your computer and use it in GitHub Desktop.
<html>
<canvas id="canvas" width="256" height="256" />
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'black';
ctx.fillRect(0, 0, 256, 256);
ctx.fillStyle = 'white';
function setPixel(x, y) {
ctx.fillRect(x, y, 1, 1);
}
function circle(cx, cy, r) {
// !!! :D
}
circle(128, 128, 32);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment