Package pySVG :: Module pysvg :: Class BaseElement
[hide private]
[frames] | no frames]

Class BaseElement

source code

This is the base class for all svg elements like elipses, texts, lines etc.

Instance Methods [hide private]
 
__init__(self, startTag, style_dict=None, focusable=None, endTag="/>\n")
initializes the object
source code
 
getXMLFromStyle(self)
This method converts the information in the style dictionary into svg syntax for the style attribute
source code
 
getXML(self)
Return a XML representation of the current element.
source code
Method Details [hide private]

__init__(self, startTag, style_dict=None, focusable=None, endTag="/>\n")
(Constructor)

source code 

initializes the object

Parameters:
  • startTag (string) - the tag for the svg element name (e.g. <text )
  • style_dict (dictionary) - the style to use for this element
  • focusable (??) - ??

getXMLFromStyle(self)

source code 

This method converts the information in the style dictionary into svg syntax for the style attribute

Returns:
the representation of the current style as an xml string

getXML(self)

source code 

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

Returns:
the representation of the current element as an xml string