Skip to content

Instantly share code, notes, and snippets.

@carlosrojaso
Created May 12, 2014 07:09
Show Gist options
  • Save carlosrojaso/a676480b791a1e1c515c to your computer and use it in GitHub Desktop.
Save carlosrojaso/a676480b791a1e1c515c to your computer and use it in GitHub Desktop.
lineTo
<!DOCTYPE html>
<html>
<body>
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.moveTo(0,0);
ctx.lineTo(200,100);
ctx.stroke();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment