Skip to content

Instantly share code, notes, and snippets.

@papsl
Created February 13, 2015 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save papsl/b88fd8e49ddaeecdadb7 to your computer and use it in GitHub Desktop.
Save papsl/b88fd8e49ddaeecdadb7 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Simple SVG "pipe"</title>
</head>
<body>
<canvas id='canvas' width='1024' height='800'></canvas>
<script>
var ctx = document.getElementById("canvas").getContext("2d");
// #layer1
// #rect3354
ctx.beginPath();
ctx.lineJoin = 'miter';
ctx.globalAlpha = 0.33;
ctx.strokeStyle = 'rgb(0, 0, 0)';
ctx.lineCap = 'butt';
ctx.lineWidth = 1.000000;
ctx.fillStyle = 'rgb(212, 0, 0)';
ctx.rect(105.714290, 60.933632, 525.714290, 428.571440);
ctx.fill();
ctx.stroke();
// #rect4156
ctx.beginPath();
ctx.globalAlpha = 0.33;
ctx.fillStyle = 'rgb(212, 0, 0)';
ctx.rect(17.142857, 343.790770, 454.285710, 280.000000);
ctx.fill();
// #path4158
ctx.beginPath();
ctx.globalAlpha = 0.33;
ctx.fillStyle = 'rgb(212, 0, 0)';
ctx.moveTo(228.571440, 126.647910);
ctx.bezierCurveTo(509.047215, 226.647910, 574.285720, 277.815365, 574.285720, 340.933620);
ctx.bezierCurveTo(574.285720, 404.051875, 509.047215, 455.219330, 428.571440, 455.219330);
ctx.bezierCurveTo(348.095665, 455.219330, 282.857160, 404.051875, 282.857160, 340.933620);
ctx.bezierCurveTo(282.857160, 277.815365, 348.095665, 226.647910, 428.571440, 226.647910);
ctx.fill();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment