[Sugar-devel] [Karma] impressed by SVGWeb, so far

S Page skierpage at gmail.com
Mon Sep 21 22:34:16 EDT 2009


> hm, the more I look at it the more it seems that the svg web project
> page shows off the power of regular svg ...  svg-web is perhaps more focused
> on cross-browser support.

Yes.  My understanding is svg-web is mostly a hack to wrap the XML of
SVG in a script tag so that the script can make it work in Microsoft's
joke browsers.  Just get rid of the <script> tag, maybe add <!doctype
html> at the top, and their examples of SVG in HTML should work fine
in decent browsers without that overhead.

> and doesn't provide high-level drawing functions like raphaeljs does.

1) You should be able to inject new SVG by manipulating the DOM,
thereby  changing the SVG and making new stuff appear.  svg-web
includes some DOM manipulation but so do other JS toolkits.

2) There is limited animation capability in SVG+SMIL (careful many of
the examples on the Web are stuck using the Adobe syntax for embedding
SVG).

http://www.kevlindev.com/tutorials/basics/index.htm is a nice intro to
both techniques.

3)  There are also weird mutants like
http://hacks.mozilla.org/2009/06/rendering-svg-canvas-burst/ , where
as I understand it the Burst JavaScript framework can read in
fragments of drawings from SVG files and then animate them on a
canvas.  E.g.  <http://hyper-metrix.com/burst/development/doc/demos/js/GitHub%27s-Octocat.htm>

Lots of ways to do it!
<https://www.svgopen.org/2009/papers/54-SVG_vs_Canvas_on_Trivial_Drawing_Application/>
is a paper that tries to compare canvas and SVG, but there's no
definitive answer.

--
=S Page


More information about the Sugar-devel mailing list