[Mirror for bower] DEPRECATED use the official repo: https://github.com/gabelerner/canvg
MIT License
[Mirror for bower] Javascript SVG parser and renderer on Canvas: https://code.google.com/p/canvg/
<script type="text/javascript" src="dist/canvg.bundle.min.js"></script>
Put a canvas on your page
<canvas id="canvas" width="1000px" height="600px"></canvas>
Example canvg calls:
<script type="text/javascript">
window.onload = function() {
//load '../path/to/your.svg' in the canvas with id = 'canvas'
canvg('canvas', '../path/to/your.svg')
//load a svg snippet in the canvas with id = 'drawingArea'
canvg(document.getElementById('drawingArea'), '<svg>...</svg>')
//ignore mouse events and animation
canvg('canvas', 'file.svg', { ignoreMouse: true, ignoreAnimation: true })
}
</script>
The third parameter is options: