<commit_before>Introduction
============
canvg is a SVG parser and renderer. It takes a URL to a SVG file or the text of an SVG file, parses it in JavaScript, and renders the result on a [Canvas](http://dev.w3.org/html5/2dcontext/) element.  The rendering speed of the examples is about as fast as native SVG.

What's implemented?
===================
The end goal is everything from the [SVG spec](http://www.w3.org/TR/SVG/). The majority of the rendering and animation is working.  If you would like to see a feature implemented, don't hesitate to contact me or add it to the issues list.

Potential uses
===============
* Allows for inline embedding of SVG through JavaScript (w/o having to request another file or break validation)
* Allows for single SVG version across all browsers that support Canvas
* Allows for mobile devices supporting Canvas but not SVG to render SVG
* Allows for SVG -> Canvas -> png transition all on the client side (through [toDataUrl](http://www.w3.org/TR/html5/the-canvas-element.html#dom-canvas-todataurl))

Example Demonstration
=====================
[view here](http://canvg.github.io/canvg/examples/index.htm)
Tested in Chrome, Firefox, Opera, and IE (through FlashCanvas)

[jsfiddle playground](http://jsfiddle.net/L3hondLn/)

Usage
=====
Include the following files in your page:
```html
<script type="text/javascript" src="http://canvg.github.io/canvg/rgbcolor.js"></script> 
<script type="text/javascript" src="http://canvg.github.io/canvg/StackBlur.js"></script>
<script type="text/javascript" src="http://canvg.github.io/canvg/canvg.js"></script> 
```

Put a canvas on your page
```html
<canvas id="canvas" width="1000px" height="600px"></canvas> 
```

Example canvg calls:
```html
<script type="text/javascript">
window.onload = function() {
  //load '../path/to/your.svg' in the canvas with id = 'canvas'
  canvg('canvas', '../path/to/your.svg')<commit_msg>Fixed jsfiddle external resources links<commit_after>Introduction
============
canvg is a SVG parser and renderer. It takes a URL to a SVG file or the text of an SVG file, parses it in JavaScript, and renders the result on a [Canvas](http://dev.w3.org/html5/2dcontext/) element.  The rendering speed of the examples is about as fast as native SVG.

What's implemented?
===================
The end goal is everything from the [SVG spec](http://www.w3.org/TR/SVG/). The majority of the rendering and animation is working.  If you would like to see a feature implemented, don't hesitate to contact me or add it to the issues list.

Potential uses
===============
* Allows for inline embedding of SVG through JavaScript (w/o having to request another file or break validation)
* Allows for single SVG version across all browsers that support Canvas
* Allows for mobile devices supporting Canvas but not SVG to render SVG
* Allows for SVG -> Canvas -> png transition all on the client side (through [toDataUrl](http://www.w3.org/TR/html5/the-canvas-element.html#dom-canvas-todataurl))

Example Demonstration
=====================
[view here](http://canvg.github.io/canvg/examples/index.htm)
Tested in Chrome, Firefox, Opera, and IE (through FlashCanvas)

[jsfiddle playground](http://jsfiddle.net/6r2jug6o/)

Usage
=====
Include the following files in your page:
```html
<script type="text/javascript" src="http://canvg.github.io/canvg/rgbcolor.js"></script> 
<script type="text/javascript" src="http://canvg.github.io/canvg/StackBlur.js"></script>
<script type="text/javascript" src="http://canvg.github.io/canvg/canvg.js"></script> 
```

Put a canvas on your page
```html
<canvas id="canvas" width="1000px" height="600px"></canvas> 
```

Example canvg calls:
```html
<script type="text/javascript">
window.onload = function() {
  //load '../path/to/your.svg' in the canvas with id = 'canvas'
  canvg('canvas', '../path/to/your.svg')
{'fraction_non_alphanumeric': 0.15553235908141963, 'fraction_numerical': 0.007828810020876827, 'mean_word_length': 4.781297134238311, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3968359', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1128, 'n_words': 415}