MCPcopy Create free account
hub / github.com/devilsen/CZXing / encode

Method encode

czxing/src/main/cpp/zxing/src/qrcode/QRWriter.cpp:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30{}
31
32BitMatrix Writer::encode(const std::wstring& contents, int width, int height) const
33{
34 if (contents.empty()) {
35 throw std::invalid_argument("Found empty contents");
36 }
37
38 if (width < 0 || height < 0) {
39 throw std::invalid_argument("Requested dimensions are invalid");
40 }
41
42 EncodeResult code = Encode(contents, _ecLevel, _encoding, _version, _useGs1Format, _maskPattern);
43 return Inflate(std::move(code.matrix), width, height, _margin);
44}
45
46BitMatrix Writer::encode(const std::string& contents, int width, int height) const
47{

Callers

nothing calls this directly

Calls 5

InflateFunction · 0.85
moveFunction · 0.85
EncodeFunction · 0.70
FromUtf8Function · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected