Draw a line.
[php lang=”JavaScript”]$(function() {
var canvas, context, width, height;
canvas = $(“#canvas”).get(0);
context = canvas.getContext(“2d”);
width = canvas.width;
height = canvas.height;
context.beginPath();
context.moveTo(0, height / 2);
context.lineTo(width, height / 2);
context.stroke();
});[/php]
What a mysterious post. Would you care to elaborate on the purpose besides drawing a horizontal line? (or am I missing something here?)
“Iteration 1”
Ok ok, I’ll be patient and wait for future iterations 🙂
I got some guesses but don’t want to spoil it 🙂