Fixed simple errors in C++ and Python code.

pull/4/head
Nayuki Minase 9 years ago
parent fc5f11b3b2
commit 8bdecc51a3

@ -171,7 +171,7 @@ std::string qrcodegen::QrCode::toSvgString(int border) const {
sb << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
sb << "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 ";
sb << (size + border * 2) << " " << (size + border * 2) << "\">\n";
sb << "\t<rect width=\"100%\" height=\"100%\" fill=\"#FFFFFF\" stroke-width=\"0\"/>\n"
sb << "\t<rect width=\"100%\" height=\"100%\" fill=\"#FFFFFF\" stroke-width=\"0\"/>\n";
sb << "\t<path d=\"";
bool head = true;
for (int y = -border; y < size + border; y++) {

@ -66,6 +66,7 @@ class QrCode(object):
# ---- Public static factory functions ----
@staticmethod
def encode_text(text, ecl):
"""Returns a QR Code symbol representing the given Unicode text string at the given error correction level.
As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer Unicode
@ -74,6 +75,7 @@ class QrCode(object):
return QrCode.encode_segments(segs, ecl)
@staticmethod
def encode_binary(data, ecl):
"""Returns a QR Code symbol representing the given binary data string at the given error correction level.
This function always encodes using the binary segment mode, not any text mode. The maximum number of

Loading…
Cancel
Save