Module Drawing :: Class SVG
[hide private]
[frames] | no frames]

Class SVG

source code

OutputLanguage --+
                 |
                SVG

SVG backend.

Instance Methods [hide private]
 
__init__(self, docTitle, version='1.1', useCSS=True) source code
 
_clearState(self) source code
 
bbox(self)
Return a bounding box around the contents of the current active group.
source code
 
_cachedAttribs(self, attribs, **addlAttribs) source code
 
loadScript(self, scriptURL)
SVG-specific method: generate a reference which will load the specified script when this SVG drawing is viewed.
source code
 
view(self, bbox, id=None, viewTarget=None)
Emit an SVG 'view' element.
source code
 
comment(self, text) source code
 
setlinewidth(self, width, force=False) source code
 
setrgbcolor(self, r, g, b) source code
 
setgray(self, gray) source code
 
setgrayorrgb(self, x) source code
 
setlinecap(self, linecap) source code
 
path(self, **attribs) source code
 
setfont(self, font, scale) source code
 
text(self, x, y, text, bbox=True, **attribs) source code
 
group(self, link=None, view_id=None, **attribs) source code
 
defineSymbol(self, name)
Define a symbol named 'name'.
source code
 
refSymbol(self, name, x, y) source code
 
_mkAttrib(self, **attribs) source code
 
esc(self, str)
Perform appropriate XML content escaping for the given string.
source code
 
escId(self, str)
Return a value suitable for an XML 'id' given an arbitrary string.
source code
 
indent(self, str) source code
 
__str__(self)
Return an SVG document.
source code

Inherited from OutputLanguage: fill, rotate, stroke, translate, write

Method Details [hide private]

defineSymbol(self, name)

source code 

Define a symbol named 'name'.

with out.defineSymbol('foo'):
out.moveto(0,0) # etc