• This repository has been archived on 08/Apr/2020
  • Stars
    star
    128
  • Rank 280,271 (Top 6 %)
  • Language
    JavaScript
  • Created almost 13 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Export Raphaël paper objects to SVG.

Raphael.Export

Export Raphaël paper objects to SVG. Also works in browsers that don't support SVG (e.g. IE6, IE7, IE8).

Example

<script type="text/javascript" src="raphael-min.js"></script>
<script type="text/javascript" src="raphael.export.js"></script>

<div id="foo"></div>
<div id="bar"></div>

<script type="text/javascript">
	var paper = Raphael('foo');

	var rect = paper
		.rect(50, 40, 50, 50)
		.attr('fill', '#f00')
		.transform('S2')
		.rotate(10)
		;

	var svg = paper.toSVG();

	document.getElementById('bar').innerHTML = svg;
</script>