Skip to content

Instantly share code, notes, and snippets.

@greeneggsandmushrooms
Created November 3, 2017 17:09
Show Gist options
  • Save greeneggsandmushrooms/409f6e8823d3081cf5de07eb1fe3259a to your computer and use it in GitHub Desktop.
Save greeneggsandmushrooms/409f6e8823d3081cf5de07eb1fe3259a to your computer and use it in GitHub Desktop.
<style id="jsbin-css">
var aCanvas = document.getElementById("aCanvas");
var context = aCanvas.getContext("2d");
context.fillStyle="red";
context.fillRect(10,10,100,100);
</style>
<svg>
<circle cx="150" cy="130" r="120" fill="orange" stroke="maroon" stroke-width="10"/>
<ellipse cx="100" cy="100" rx="20" ry="40" fill="purple" stroke="maroon" stroke-width="10"/>
<ellipse cx="200" cy="100" rx="20" ry="40" fill="purple" stroke="maroon" stroke-width="10"/>
<polygon points="100,80,200,80,150,50" style="fill:yellow; stroke=black; stroke-width=2;">
</svg>
<script id="jsbin-javascript">
var aCanvas = document.getElementById("aCanvas");
var context = aCanvas.getContext("2d");
context.beginPath();
context.arc(100,100,50,0,2*Math.PI);
context.stroke();
</script>
<script id="jsbin-source-html" type="text/html"><svg>
<circle cx="150" cy="130" r="120" fill="orange" stroke="maroon" stroke-width="10"/>
<ellipse cx="100" cy="100" rx="20" ry="40" fill="purple" stroke="maroon" stroke-width="10"/>
<ellipse cx="200" cy="100" rx="20" ry="40" fill="purple" stroke="maroon" stroke-width="10"/>
<polygon points="100,80,200,80,150,50" style="fill:yellow; stroke=black; stroke-width=2;">
</svg>
</script>
<script id="jsbin-source-css" type="text/css">var aCanvas = document.getElementById("aCanvas");
var context = aCanvas.getContext("2d");
context.fillStyle="red";
context.fillRect(10,10,100,100);</script>
<script id="jsbin-source-javascript" type="text/javascript">var aCanvas = document.getElementById("aCanvas");
var context = aCanvas.getContext("2d");
context.beginPath();
context.arc(100,100,50,0,2*Math.PI);
context.stroke();</script>
var aCanvas = document.getElementById("aCanvas");
var context = aCanvas.getContext("2d");
context.fillStyle="red";
context.fillRect(10,10,100,100);
var aCanvas = document.getElementById("aCanvas");
var context = aCanvas.getContext("2d");
context.beginPath();
context.arc(100,100,50,0,2*Math.PI);
context.stroke();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment