Skip to content

Instantly share code, notes, and snippets.

@joehakimrahme
Created September 18, 2012 19:49
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 joehakimrahme/3745404 to your computer and use it in GitHub Desktop.
Save joehakimrahme/3745404 to your computer and use it in GitHub Desktop.
Canvas matrix
window.onload = function () {
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.beginPath();
for (var i=100; i<= 200; i += 25) {
context.moveTo(i, 50);
context.lineTo(i, 150);
context.moveTo(100, i-50);
context.lineTo(200, i-50);
context.stroke();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment