I simply want to draw two line segments, the first in blue, the second in red:
function testDraw(){
context.moveTo(0,0); context.lineTo(myCanvasWidth/2, myCanvasHeight/2);
context.strokeStyle = "blue";
context.stroke();
context.lineTo(myCanvasWidth, 0);
context.strokeStyle = "red";
context.stroke();
}
The problem is that the first blue line segment is gone over again - in red.
I'm a javascript beginner, and I'm sure this is trivial, but I'd appreciate help nevertheless.
Thanks.