forked from jeresig/env-js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added some simple svg support so you can load raphaeljs in envjs and …
…write out the resulting svg document. itegrated suggested patch from richard frankel. awesome fun stuff
- Loading branch information
thatcher
committed
Aug 19, 2010
1 parent
f381242
commit 94c414c
Showing
14 changed files
with
3,804 additions
and
21 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @author thatcher | ||
*/ | ||
load('dist/env.rhino.js'); | ||
load('plugins/jquery.js'); | ||
load('plugins/vendor/raphael.js'); | ||
|
||
// Creates canvas 320 × 200 at 10, 50 | ||
var paper = Raphael(10, 50, 320, 200); | ||
|
||
// Creates circle at x = 50, y = 40, with radius 10 | ||
var circle = paper.circle(50, 40, 10); | ||
// Sets the fill attribute of the circle to red (#f00) | ||
circle.attr("fill", "#f00"); | ||
|
||
// Sets the stroke attribute of the circle to white | ||
circle.attr("stroke", "#fff"); | ||
|
||
Envjs.writeToFile(document.body.innerHTML, Envjs.uri('reports/svg.html')); |
Oops, something went wrong.