Version 4 of SVG

Updated 2002-11-05 09:54:44

Scalable vector graphics: "very cool stuff".

The "native" language for scripting SVG--that is, for animating an SVG document by run-time modification of its node tree with SVGDOM--is JavaScript. Steve Ball has been thinking about the desirability of binding Tcl to SVGDOM (perhaps by way of Batik [L1 ] and Jacl?).


RS: Many of SVG's items have a very close correspondence to canvas items, so one might consider using SVG for "serializing" a canvas content to XML, and loading canvas contents from XML... Consider this snippet:

  <polygon fill="yellow" stroke="none"
    points="350 75, 379 161, 469 161, 397 215,
            423 301, 350 250, 277 301, 303 215,
            231 161, 321 161"
    transform="scale(.5)" />

With some string manipulation (and determining the center from the bounding box, for scaling) this could easily be transformed into two canvas commands.


http://hem.fyristorg.com/matben/download/can2svg.tcl