Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions core/src/Barcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Result::Result(DecoderResult&& decodeResult, DetectorResult&& detectorResult, Ba
_position(std::move(detectorResult).position()),
_sai(decodeResult.structuredAppend()),
_format(format),
_dataMask(decodeResult.dataMask()),
_lineCount(decodeResult.lineCount()),
_isMirrored(decodeResult.isMirrored()),
_readerInit(decodeResult.readerInit())
Expand Down Expand Up @@ -136,6 +137,11 @@ std::string Result::version() const
return _version;
}

int Result::dataMask() const
{
return _dataMask;
}

Result& Result::setReaderOptions(const ReaderOptions& opts)
{
if (opts.characterSet() != CharacterSet::Unknown)
Expand Down
6 changes: 6 additions & 0 deletions core/src/Barcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ class Result
*/
std::string version() const;

/**
* @brief QRCode data mask.
*/
int dataMask() const;

#ifdef ZXING_EXPERIMENTAL_API
void symbol(BitMatrix&& bits);
ImageView symbol() const;
Expand All @@ -192,6 +197,7 @@ class Result
BarcodeFormat _format = BarcodeFormat::None;
char _ecLevel[4] = {};
char _version[4] = {};
int _dataMask = 0;
int _lineCount = 0;
bool _isMirrored = false;
bool _isInverted = false;
Expand Down