| |
- builtins.object
-
- Element
class Element(builtins.object) |
|
Element(tag: str = None, text: str = '', attrib: List[svgen.attribute.Attribute] = None, children: List[ForwardRef('Element')] = None, allow_no_end_tag: bool = True, class_str: str = None, **extra) -> None
A basic interface for an SVG element. |
|
Methods defined here:
- __getitem__(self, tag: str) -> str
- Get an attibute as a string.
- __init__(self, tag: str = None, text: str = '', attrib: List[svgen.attribute.Attribute] = None, children: List[ForwardRef('Element')] = None, allow_no_end_tag: bool = True, class_str: str = None, **extra) -> None
- Construct a new SVG element.
- __setitem__(self, tag: str, value: Union[str, int, float, bool]) -> None
- Allow adding attributes dict-set style.
- add_attribute(self, attr: svgen.attribute.Attribute, strict: bool = True) -> 'Element'
- Add an attribute to this element.
- add_class(self, *data: str) -> None
- Add a class string.
- closing(self, indent: int = 0) -> str
- Create a string to close this element.
- encode(self, output: <class 'TextIO'>, quote: str = '"', indent: int = 0, newlines: bool = True) -> None
- Encode this element to a string stream.
- encode_str(self, quote: str = '"', indent: int = 0, newlines: bool = True) -> str
- Encode this element to a string.
Readonly properties defined here:
- style
- Get the style attribute for this element.
- xml
- Get this element as an xml element.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
| |