summon.svg
index
/home/raz/projects/summon/lib/summon/svg.py

    Summon - SVG output
 
NOTE: zoom_clamps are not supported yet and text elements have basic support

 
Modules
       
atexit
math
os
summon
summon_core
threading
time
summon.transform
summon.util
summon.vector

 
Classes
       
SvgWriter

 
class SvgWriter
     Methods defined here:
__init__(self)
popTransform(self, elm)
printBeginTransform(self, elm)
write the opening tag for a transform
printElm(self, elm)
write the SVG an element and all of its children
printEndTransform(self, elm)
write the closing tag for a transform
printGraphic(self, elm)
write the SVG for a graphics element
printLine(self, x1, y1, x2, y2, color)
printPolygon(self, verts, color)
printText(self, elm)
write the SVG for a text element
pushTransform(self, elm)
write(self, outfile, group, visible=(0.0, 0.0, 500.0, 500.0), size=(500, 500), bgcolor=(0, 0, 0), win=None, scale=(1.0, 1.0))
print out svg code

 
Functions
       
color2string(color)
printScreen(win, filename=None, visgroup=None)
printScreenPng(win, pngFilename=None)
writeSvg(outfile, group, visible=(0.0, 0.0, 500.0, 500.0), size=(500, 500), bgcolor=(0, 0, 0), win=None, scale=(1.0, 1.0))

 
Data
        svgEndTag = '</svg>'
svgHeader = "<?xml version='1.0' encoding='UTF-8'?> \n<!DOCTYP...tp://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>\n"
svgTag = "\n<svg width='%d' height='%d' xmlns='http://www.w3.org/2000/svg' version='1.1'>\n"