Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
svg open 2010 presentation is over, yay!
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
The missing SVG.toDataURL method for your SVG elements. | ||
The missing SVG.toDataURL() method for your SVG elements. | ||
|
||
Requires canvg for PNG exporting: http://code.google.com/p/canvg/. | ||
|
||
Compatible with ~latest versions of Firefox, Safari, Chrome, Opera and Internet Explorer 9 | ||
|
||
0) install canvg: | ||
0) Install canvg: | ||
<script type="text/javascript" src="rgbcolor.js"></script> | ||
<script type="text/javascript" src="canvg.js"></script> | ||
1) <script type="text/javascript" src="svg_todataurl.js"></script> | ||
2) var pngDataURL = mySVGelement.toDataURL("image/png"); | ||
myImg.setAttribute("src", pngDataURL); | ||
2.5) myImg.setAttribute("src", pngDataURL); | ||
|
||
^_____^ |