Lines Matching refs:qr
47 static std::string toSvgString(const QrCode &qr, int border);
48 static void printQr(const QrCode &qr);
70 const QrCode qr = QrCode::encodeText(text, errCorLvl); in doBasicDemo() local
71 printQr(qr); in doBasicDemo()
72 std::cout << toSvgString(qr, 4) << std::endl; in doBasicDemo()
194 static std::string toSvgString(const QrCode &qr, int border) { in toSvgString() argument
197 if (border > INT_MAX / 2 || border * 2 > INT_MAX - qr.getSize()) in toSvgString()
204 sb << (qr.getSize() + border * 2) << " " << (qr.getSize() + border * 2) << "\" stroke=\"none\">\n"; in toSvgString()
207 for (int y = 0; y < qr.getSize(); y++) { in toSvgString()
208 for (int x = 0; x < qr.getSize(); x++) { in toSvgString()
209 if (qr.getModule(x, y)) { in toSvgString()
223 static void printQr(const QrCode &qr) { in printQr() argument
225 for (int y = -border; y < qr.getSize() + border; y++) { in printQr()
226 for (int x = -border; x < qr.getSize() + border; x++) { in printQr()
227 std::cout << (qr.getModule(x, y) ? "##" : " "); in printQr()