MCPcopy Index your code
hub / github.com/lincolnloop/python-qrcode / _svg

Method _svg

qrcode/image/svg.py:91–105  ·  view source on GitHub ↗
(self, tag="svg", **kwargs)

Source from the content-addressed store, hash-verified

89 }
90
91 def _svg(self, tag="svg", **kwargs):
92 svg = super()._svg(tag=tag, **kwargs)
93 svg.set("xmlns", self._SVG_namespace)
94 if self.background:
95 svg.append(
96 ET.Element(
97 "rect",
98 fill=self.background,
99 x="0",
100 y="0",
101 width="100%",
102 height="100%",
103 )
104 )
105 return svg
106
107 def _write(self, stream):
108 ET.ElementTree(self._img).write(stream, encoding="UTF-8", xml_declaration=True)

Callers 1

_svgMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected