blob: da47d6617d58b2240f9d2317b4a0c839d250e3c6 [file] [log] [blame]
<canvas id="canvas" class="output" width="300" height="300"></canvas>
<script>
var ctx = document.getElementById("canvas").getContext("2d");
var angle = .4;
var s = Math.sin(angle);
var c = Math.cos(angle);
ctx.beginPath();
ctx.transform(c,s,-s,c,0,0);
ctx.moveTo(100,100);
ctx.lineTo(20,30);
ctx.transform(c,s,-s,c,0,0);
ctx.lineTo(40,-50);
ctx.stroke();
</script>