Method
_svg
(self, tag=None, version="1.1", **kwargs)
Source from the content-addressed store, hash-verified
| 59 | return self._svg(**kwargs) |
| 60 | |
| 61 | def _svg(self, tag=None, version="1.1", **kwargs): |
| 62 | if tag is None: |
| 63 | tag = ET.QName(self._SVG_namespace, "svg") |
| 64 | dimension = self.units(self.pixel_size) |
| 65 | return ET.Element( |
| 66 | tag, # type: ignore |
| 67 | width=dimension, |
| 68 | height=dimension, |
| 69 | version=version, |
| 70 | **kwargs, |
| 71 | ) |
| 72 | |
| 73 | def _write(self, stream): |
| 74 | ET.ElementTree(self._img).write(stream, xml_declaration=False) |
Tested by
no test coverage detected