69 private:
int modeBits;
72 private:
int numBitsCharCount[3];
77 private:
Mode(
int mode,
int cc0,
int cc1,
int cc2);
156 private:
const Mode *mode;
162 private:
int numChars;
216 private:
static const char *ALPHANUMERIC_CHARSET;
254 private:
static int getFormatBits(
Ecc ecl);
293 int minVersion=1,
int maxVersion=40,
int mask=-1,
bool boostEcl=
true);
303 private:
int version;
310 private:
Ecc errorCorrectionLevel;
378 private:
void drawFunctionPatterns();
383 private:
void drawFormatBits(
int msk);
388 private:
void drawVersion();
393 private:
void drawFinderPattern(
int x,
int y);
398 private:
void drawAlignmentPattern(
int x,
int y);
403 private:
void setFunctionModule(
int x,
int y,
bool isDark);
407 private:
bool module(
int x,
int y)
const;
427 private:
void applyMask(
int msk);
432 private:
long getPenaltyScore()
const;
447 private:
static int getNumRawDataModules(
int ver);
453 private:
static int getNumDataCodewords(
int ver,
Ecc ecl);
472 private:
int finderPenaltyCountPatterns(
const std::array<int,7> &runHistory)
const;
476 private:
int finderPenaltyTerminateAndCount(
bool currentRunColor,
int currentRunLength,
std::array<int,7> &runHistory)
const;
480 private:
void finderPenaltyAddHistory(
int currentRunLength,
std::array<int,7> &runHistory)
const;
484 private:
static bool getBit(
long x,
int i);
497 private:
static const int PENALTY_N1;
498 private:
static const int PENALTY_N2;
499 private:
static const int PENALTY_N3;
500 private:
static const int PENALTY_N4;
503 private:
static const std::int8_t ECC_CODEWORDS_PER_BLOCK[4][41];
504 private:
static const std::int8_t NUM_ERROR_CORRECTION_BLOCKS[4][41];
Definition: qrcode_gen.hpp:534
void appendBits(std::uint32_t val, int len)
Definition: qrcode_gen.cpp:824
BitBuffer()
Definition: qrcode_gen.cpp:820
Definition: qrcode_gen.hpp:238
static constexpr int MIN_VERSION
Definition: qrcode_gen.hpp:490
int getSize() const
Definition: qrcode_gen.cpp:368
static QrCode encodeBinary(const std::vector< std::uint8_t > &data, Ecc ecl)
Definition: qrcode_gen.cpp:254
int getMask() const
Definition: qrcode_gen.cpp:378
Ecc
Definition: qrcode_gen.hpp:245
Ecc getErrorCorrectionLevel() const
Definition: qrcode_gen.cpp:373
static QrCode encodeText(const char *text, Ecc ecl)
Definition: qrcode_gen.cpp:247
static QrCode encodeSegments(const std::vector< QrSegment > &segs, Ecc ecl, int minVersion=1, int maxVersion=40, int mask=-1, bool boostEcl=true)
Definition: qrcode_gen.cpp:260
bool getModule(int x, int y) const
Definition: qrcode_gen.cpp:383
static constexpr int MAX_VERSION
Definition: qrcode_gen.hpp:493
int getVersion() const
Definition: qrcode_gen.cpp:363
QrCode(int ver, Ecc ecl, const std::vector< std::uint8_t > &dataCodewords, int msk)
Definition: qrcode_gen.cpp:321
Definition: qrcode_gen.hpp:55
static const Mode ALPHANUMERIC
Definition: qrcode_gen.hpp:60
int getModeBits() const
Definition: qrcode_gen.cpp:52
static const Mode BYTE
Definition: qrcode_gen.hpp:61
int numCharCountBits(int ver) const
Definition: qrcode_gen.cpp:57
static const Mode NUMERIC
Definition: qrcode_gen.hpp:59
static const Mode ECI
Definition: qrcode_gen.hpp:63
static const Mode KANJI
Definition: qrcode_gen.hpp:62
Definition: qrcode_gen.hpp:48
static QrSegment makeEci(long assignVal)
Definition: qrcode_gen.cpp:143
static QrSegment makeAlphanumeric(const char *text)
Definition: qrcode_gen.cpp:102
int getNumChars() const
Definition: qrcode_gen.cpp:220
static std::vector< QrSegment > makeSegments(const char *text)
Definition: qrcode_gen.cpp:125
static QrSegment makeBytes(const std::vector< std::uint8_t > &data)
Definition: qrcode_gen.cpp:69
const Mode & getMode() const
Definition: qrcode_gen.cpp:215
QrSegment(const Mode &md, int numCh, const std::vector< bool > &dt)
Definition: qrcode_gen.cpp:161
const std::vector< bool > & getData() const
Definition: qrcode_gen.cpp:225
static bool isAlphanumeric(const char *text)
Definition: qrcode_gen.cpp:206
static int getTotalBits(const std::vector< QrSegment > &segs, int version)
Definition: qrcode_gen.cpp:179
static QrSegment makeNumeric(const char *digits)
Definition: qrcode_gen.cpp:79
static bool isNumeric(const char *text)
Definition: qrcode_gen.cpp:196
Definition: qrcode_gen.hpp:523
data_too_long(const std::string &msg)
Definition: qrcode_gen.cpp:813
void * data
Definition: core_c.h:427
const CvArr CvArr * x
Definition: core_c.h:1195
const CvArr * y
Definition: core_c.h:1187
const char * text
Definition: imgproc_c.h:1143
Definition: qrcode_gen.hpp:34
std::string toSvgString(const QrCode &qr, std::string fill)
Definition: utils.cpp:4