papsl
2/13/2015 - 11:39 AM

svg sample pipe.html

<!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>