Mercurial > hgrepos > Python2 > PyMuPDF
diff mupdf-source/thirdparty/zxing-cpp/wrappers/winrt/BarcodeReader.h @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mupdf-source/thirdparty/zxing-cpp/wrappers/winrt/BarcodeReader.h Mon Sep 15 11:43:07 2025 +0200 @@ -0,0 +1,60 @@ +/* +* Copyright 2016 Nu-book Inc. +*/ +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "BarcodeFormat.h" +#include "ReaderOptions.h" + +#include <memory> + +namespace ZXing { + +public enum class BarcodeType : int { + AZTEC, + CODABAR, + CODE_39, + CODE_93, + CODE_128, + DATA_MATRIX, + DX_FILM_EDGE, + EAN_8, + EAN_13, + ITF, + MAXICODE, + PDF_417, + QR_CODE, + MICRO_QR_CODE, + RMQR_CODE, + RSS_14, + RSS_EXPANDED, + DATA_BAR_LIMITED, + UPC_A, + UPC_E +}; + +ref class ReadResult; + +public ref class BarcodeReader sealed +{ +public: + BarcodeReader(bool tryHarder, bool tryRotate, const Platform::Array<BarcodeType>^ types); + BarcodeReader(bool tryHarder, bool tryRotate); + BarcodeReader(bool tryHarder); + + ReadResult^ Read(Windows::Graphics::Imaging::SoftwareBitmap^ bitmap, int cropWidth, int cropHeight); + +private: + ~BarcodeReader(); + + void init(bool tryHarder, bool tryRotate, const Platform::Array<BarcodeType>^ types); + + static BarcodeFormat ConvertRuntimeToNative(BarcodeType type); + static BarcodeType ConvertNativeToRuntime(BarcodeFormat format); + + std::unique_ptr<ReaderOptions> m_opts; +}; + +} // ZXing
