style

Module: style

Inheritance diagram for pysvg.style:

(C) 2008, 2009 Kerim Mansour For licensing information please refer to license.txt

style

class pysvg.style.style(**kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.XLinkAttrib

Class representing the style element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAttribute(attribute_name)
getElementAt(pos)
getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_id()
get_media()
get_title()
get_type()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)
Transforms characters between xml notation and python notation.
save(filename, encoding='ISO-8859-1', standalone='no')
Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt
setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)
Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”
set_id(id)
set_media(media)
set_title(title)
set_type(type)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')
Method that provides a standard svg header string for a file

Table Of Contents

This Page