Jayant's Blog

Wednesday, December 31, 2008

Integrating SVG in blogger post

This is in response to a comment to my earlier post Integrating Dojo in blogger post.

If you want to just use SVG, the following sample works. It uses 2 external JavaScript files, one for basic SVG context and drawing (also used in the Simple SVG Shapes post) and the 2nd one for actually drawing the content.


Here is the HTML markup:

<div id="surface" style="width:300px; height:300px; border:1px solid #000;"></div>
<script type="text/javascript" src="http://ecodevil.net/dev/blog/svg.js"></script>
<script type="text/javascript" src="http://ecodevil.net/dev/blog/blogger_svg.js"></script>

I also tried with Dojo GFX. GFX is a nice abstraction layer to SVG/VML graphics. I tried integrating it into the blogger page, but that didn't worry, it kept throwing a console not found error. Here's the external JavaScript file incase you would like to try it.

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home