/third_party/qrcodegen/cpp/ |
H A D | QrCodeGeneratorDemo.cpp | 38 using qrcodegen::QrCode; 47 static std::string toSvgString(const QrCode &qr, int border); 48 static void printQr(const QrCode &qr); 67 const QrCode::Ecc errCorLvl = QrCode::Ecc::LOW; // Error correction level in doBasicDemo() 70 const QrCode qr = QrCode::encodeText(text, errCorLvl); in doBasicDemo() 79 const QrCode qr0 = QrCode::encodeText("314159265358979323846264338327950288419716939937510", QrCode in doVarietyDemo() [all...] |
H A D | qrcodegen.cpp | 234 /*---- Class QrCode ----*/ 236 int QrCode::getFormatBits(Ecc ecl) { in getFormatBits() 247 QrCode QrCode::encodeText(const char *text, Ecc ecl) { in encodeText() 253 QrCode QrCode::encodeBinary(const vector<uint8_t> &data, Ecc ecl) { in encodeBinary() 259 QrCode QrCode::encodeSegments(const vector<QrSegment> &segs, Ecc ecl, in encodeSegments() 316 return QrCode(version, ecl, dataCodewords, mask); in encodeSegments() 320 QrCode function in qrcodegen::QrCode [all...] |
H A D | qrcodegen.hpp | 229 * - High level: Take the payload data and call QrCode::encodeText() or QrCode::encodeBinary(). 230 * - Mid level: Custom-make the list of segments and call QrCode::encodeSegments(). 233 * supply the appropriate version number, and call the QrCode() constructor. 236 class QrCode final { 265 public: static QrCode encodeText(const char *text, Ecc ecl); 274 public: static QrCode encodeBinary(const std::vector<std::uint8_t> &data, Ecc ecl); 290 public: static QrCode encodeSegments(const std::vector<QrSegment> &segs, Ecc ecl, 334 public: QrCode(int ver, Ecc ecl, const std::vector<std::uint8_t> &dataCodewords, int msk); 514 * it if it was less than QrCode [all...] |
/third_party/qrcodegen/python/ |
H A D | qrcodegen-demo.py | 28 from qrcodegen import QrCode, QrSegment namespace 45 errcorlvl = QrCode.Ecc.LOW # Error correction level 48 qr = QrCode.encode_text(text, errcorlvl) 57 qr = QrCode.encode_text("314159265358979323846264338327950288419716939937510", QrCode.Ecc.MEDIUM) 61 qr = QrCode.encode_text("DOLLAR-AMOUNT:$39.87 PERCENTAGE:100.00% OPERATIONS:+-*/", QrCode.Ecc.HIGH) 65 qr = QrCode.encode_text("\u3053\u3093\u306B\u3061\u0077\u0061\u3001\u4E16\u754C\uFF01\u0020\u03B1\u03B2\u03B3\u03B4", QrCode.Ecc.QUARTILE) 69 qr = QrCode [all...] |
H A D | qrcodegen.py | 32 class QrCode: class 41 - High level: Take the payload data and call QrCode.encode_text() or QrCode.encode_binary(). 42 - Mid level: Custom-make the list of segments and call QrCode.encode_segments(). 45 supply the appropriate version number, and call the QrCode() constructor. 51 def encode_text(text: str, ecl: QrCode.Ecc) -> QrCode: 58 return QrCode.encode_segments(segs, ecl) 62 def encode_binary(data: Union[bytes,Sequence[int]], ecl: QrCode.Ecc) -> QrCode [all...] |
/third_party/qrcodegen/java/ |
H A D | QrCodeGeneratorDemo.java | 36 import io.nayuki.qrcodegen.QrCode; 58 QrCode.Ecc errCorLvl = QrCode.Ecc.LOW; // Error correction level in doBasicDemo() 60 QrCode qr = QrCode.encodeText(text, errCorLvl); // Make the QR Code symbol in doBasicDemo() 75 QrCode qr; in doVarietyDemo() 78 qr = QrCode.encodeText("314159265358979323846264338327950288419716939937510", QrCode.Ecc.MEDIUM); in doVarietyDemo() 82 qr = QrCode.encodeText("DOLLAR-AMOUNT:$39.87 PERCENTAGE:100.00% OPERATIONS:+-*/", QrCode in doVarietyDemo() [all...] |
/third_party/qrcodegen/java-fast/io/nayuki/fastqrcodegen/ |
H A D | QrCodeGeneratorDemo.java | 57 QrCode.Ecc errCorLvl = QrCode.Ecc.LOW; // Error correction level in doBasicDemo() 59 QrCode qr = QrCode.encodeText(text, errCorLvl); // Make the QR Code symbol in doBasicDemo() 74 QrCode qr; in doVarietyDemo() 77 qr = QrCode.encodeText("314159265358979323846264338327950288419716939937510", QrCode.Ecc.MEDIUM); in doVarietyDemo() 81 qr = QrCode.encodeText("DOLLAR-AMOUNT:$39.87 PERCENTAGE:100.00% OPERATIONS:+-*/", QrCode.Ecc.HIGH); in doVarietyDemo() 85 qr = QrCode in doVarietyDemo() [all...] |
H A D | QrTemplate.java | 50 if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) in QrTemplate() 129 int bit = QrCode.getBit(bits, i); in drawVersion() 219 return QrCode.getBit(grid[i >>> 5], i); in getModule() 258 if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION) in getNumRawDataModules()
|
H A D | QrCode.java | 40 * <li><p>High level: Take the payload data and call {@link QrCode#encodeText(String,Ecc)} 41 * or {@link QrCode#encodeBinary(byte[],Ecc)}.</p></li> 43 * and call {@link QrCode#encodeSegments(List,Ecc)} or 44 * {@link QrCode#encodeSegments(List,Ecc,int,int,int,boolean)}</p></li> 47 * and call the {@link QrCode#QrCode(int,Ecc,byte[],int) constructor}.</p></li> 52 public final class QrCode { class 69 public static QrCode encodeText(String text, Ecc ecl) { in encodeText() 89 public static QrCode encodeBinary(byte[] data, Ecc ecl) { in encodeBinary() 114 public static QrCode encodeSegment 238 public QrCode(int ver, Ecc ecl, byte[] dataCodewords, int msk) { QrCode() method in QrCode [all...] |
H A D | QrSegmentAdvanced.java | 39 * @see QrCode 52 * range of versions, like {@link QrCode#encodeSegments(List,QrCode.Ecc,int,int,int,boolean)}.</p> 63 public static List<QrSegment> makeSegmentsOptimally(String text, QrCode.Ecc ecl, int minVersion, int maxVersion) { in makeSegmentsOptimally() 67 if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION)) in makeSegmentsOptimally() 79 int dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available in makeSegmentsOptimally()
|
H A D | QrSegment.java | 332 assert QrCode.MIN_VERSION <= ver && ver <= QrCode.MAX_VERSION; in numCharCountBits()
|
/third_party/qrcodegen/rust/examples/ |
H A D | qrcodegen-demo.rs | 29 use qrcodegen::QrCode; 53 let qr: QrCode = QrCode::encode_text(text, errcorlvl).unwrap(); in do_basic_demo() 62 let qr = QrCode::encode_text("314159265358979323846264338327950288419716939937510", QrCodeEcc::Medium).unwrap(); in do_variety_demo() 66 let qr = QrCode::encode_text("DOLLAR-AMOUNT:$39.87 PERCENTAGE:100.00% OPERATIONS:+-*/", QrCodeEcc::High).unwrap(); in do_variety_demo() 70 let qr = QrCode::encode_text("こんにちwa、世界! αβγδ", QrCodeEcc::Quartile).unwrap(); in do_variety_demo() 74 let qr = QrCode::encode_text(concat!( in do_variety_demo() 91 let qr = QrCode::encode_text(&[silver0, silver1].concat(), QrCodeEcc::Low).unwrap(); in do_segment_demo() 98 let qr = QrCode::encode_segments(&segs, QrCodeEcc::Low).unwrap(); in do_segment_demo() 105 let qr = QrCode in do_segment_demo() [all...] |
/third_party/qrcodegen/rust-no-heap/examples/ |
H A D | qrcodegen-demo.rs | 29 use qrcodegen::QrCode; 56 let qr: QrCode = QrCode::encode_text(text, &mut tempbuffer, &mut outbuffer, in do_basic_demo() 70 let qr = QrCode::encode_text("314159265358979323846264338327950288419716939937510", in do_variety_demo() 78 let qr = QrCode::encode_text("DOLLAR-AMOUNT:$39.87 PERCENTAGE:100.00% OPERATIONS:+-*/", in do_variety_demo() 86 let qr = QrCode::encode_text("こんにちwa、世界! αβγδ", in do_variety_demo() 102 let qr = QrCode::encode_text(text, &mut tempbuffer, &mut outbuffer, in do_variety_demo() 116 let qr = QrCode::encode_text(&[silver0, silver1].concat(), &mut tempbuffer, &mut outbuffer, in do_segment_demo() 125 let (datacodewordslen, ecl, version) = QrCode::encode_segments_to_codewords( in do_segment_demo() 128 let qr = QrCode in do_segment_demo() [all...] |
/third_party/qrcodegen/rust-no-heap/src/ |
H A D | lib.rs | 59 //! use qrcodegen::QrCode; 69 //! let qr = QrCode::encode_text("Hello, world!", &mut tempbuffer, &mut outbuffer, 82 //! let qr = QrCode::encode_binary(&mut dataandtemp, 3, &mut outbuffer, QrCodeEcc::High, 97 /*---- QrCode functionality ----*/ 110 /// - High level: Take the payload data and call `QrCode::encode_text()` or `QrCode::encode_binary()`. 112 /// `QrCode::encode_segments_to_codewords()` and then `QrCode::encode_codewords()`. 115 /// appropriate version number, and call the `QrCode::encode_codewords()` constructor. 118 pub struct QrCode<' structure names 131 impl<'a> QrCode<'a> { global() impls [all...] |
/third_party/qrcodegen/rust/src/ |
H A D | lib.rs | 59 //! use qrcodegen::QrCode; 68 //! let qr = QrCode::encode_text("Hello, world!", 78 //! let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::High, 92 /*---- QrCode functionality ----*/ 105 /// - High level: Take the payload data and call `QrCode::encode_text()` or `QrCode::encode_binary()`. 107 /// `QrCode::encode_segments()` or `QrCode::encode_segments_advanced()`. 110 /// appropriate version number, and call the `QrCode::encode_codewords()` constructor. 114 pub struct QrCode { structure names 146 impl QrCode { global() impls [all...] |
/third_party/qrcodegen/java/src/main/java/io/nayuki/qrcodegen/ |
H A D | QrCode.java | 40 * <li><p>High level: Take the payload data and call {@link QrCode#encodeText(CharSequence,Ecc)} 41 * or {@link QrCode#encodeBinary(byte[],Ecc)}.</p></li> 43 * and call {@link QrCode#encodeSegments(List,Ecc)} or 44 * {@link QrCode#encodeSegments(List,Ecc,int,int,int,boolean)}</p></li> 47 * and call the {@link QrCode#QrCode(int,Ecc,byte[],int) constructor}.</p></li> 52 public final class QrCode { class 69 public static QrCode encodeText(CharSequence text, Ecc ecl) { in encodeText() 89 public static QrCode encodeBinary(byte[] data, Ecc ecl) { in encodeBinary() 114 public static QrCode encodeSegment 248 public QrCode(int ver, Ecc ecl, byte[] dataCodewords, int msk) { QrCode() method in QrCode [all...] |
H A D | QrSegmentAdvanced.java | 39 * @see QrCode 52 * range of versions, like {@link QrCode#encodeSegments(List,QrCode.Ecc,int,int,int,boolean)}.</p> 63 public static List<QrSegment> makeSegmentsOptimally(CharSequence text, QrCode.Ecc ecl, int minVersion, int maxVersion) { in makeSegmentsOptimally() 67 if (!(QrCode.MIN_VERSION <= minVersion && minVersion <= maxVersion && maxVersion <= QrCode.MAX_VERSION)) in makeSegmentsOptimally() 79 int dataCapacityBits = QrCode.getNumDataCodewords(version, ecl) * 8; // Number of data bits available in makeSegmentsOptimally()
|
H A D | QrSegment.java | 311 assert QrCode.MIN_VERSION <= ver && ver <= QrCode.MAX_VERSION; in numCharCountBits()
|
H A D | BitBuffer.java | 95 data.set(bitLength, QrCode.getBit(val, i)); in appendBits()
|