Fixed simple errors in C++ and Python code.

This commit is contained in:
Nayuki Minase 2016-04-20 20:59:31 +00:00
parent fc5f11b3b2
commit 8bdecc51a3
2 changed files with 3 additions and 1 deletions

View File

@ -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++) {

View File

@ -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