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

Class text

source code

BaseElement --+
              |
             text

Class representing the text element of an svg doc.

Instance Methods [hide private]
 
__init__(self, content, x, y, rotate=None, style_dict=None, editable=None, focusable=None)
initializes the object
source code
 
getXML(self)
Return a XML representation of the current element.
source code

Inherited from BaseElement: getXMLFromStyle

Method Details [hide private]

__init__(self, content, x, y, rotate=None, style_dict=None, editable=None, focusable=None)
(Constructor)

source code 

initializes the object

Parameters:
  • content (string) - the text to display
  • x (int) - x-coordinate for the text
  • y (int) - y-coordinate for the text
  • rotate (int) - rotation in degrees (negative means counterclockwise)
Overrides: BaseElement.__init__
(inherited documentation)

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
Overrides: BaseElement.getXML