mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Added white background rectangle to SVG XML code output, in all language versions.
This commit is contained in:
@@ -239,6 +239,7 @@ class QrCode(object):
|
||||
return """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 {0} {0}">
|
||||
<rect width="100%" height="100%" fill="#FFFFFF" stroke-width="0"/>
|
||||
<path d="{1}" fill="#000000" stroke-width="0"/>
|
||||
</svg>
|
||||
""".format(self.size + border * 2, " ".join(parts))
|
||||
|
||||
Reference in New Issue
Block a user