14extern "C" struct zint_symbol;
41 std::unique_ptr<Data> d;
53#define ZX_PROPERTY(TYPE, NAME) \
54 const TYPE& NAME() const noexcept; \
55 CreatorOptions& NAME(TYPE v)&; \
56 CreatorOptions&& NAME(TYPE v)&&;
63#define ZX_RO_PROPERTY(TYPE, NAME) \
64 std::optional<TYPE> NAME() const;
70 ZX_RO_PROPERTY(std::string,
eci);
73 ZX_RO_PROPERTY(
bool,
gs1);
116#if defined(__cpp_lib_char8_t)
120#if defined(__cpp_lib_ranges)
122requires std::ranges::contiguous_range<R> && std::ranges::sized_range<R> && (
sizeof(std::ranges::range_value_t<R>) == 1)
The Barcode class encapsulates a decoded or created barcode symbol.
Definition Barcode.h:65
Configuration options for barcode creation.
Definition CreateBarcode.h:38
friend Barcode CreateBarcode(const void *data, int size, int mode, const CreatorOptions &options)
std::optional< int > version() const
Specify the version/size of the symbol (most 2D symbologies).
std::optional< bool > gs1() const
GS1 mode (most 2D symbologies + Code128).
std::optional< std::string > eci() const
Specify ECI designator to use (e.g. "UTF-8" or "26" for UTF-8), see also libzint docs (most 2D symbol...
zint_symbol * zint() const
std::optional< int > dataMask() const
Specify dataMask to use (QRCode/MicroQRCode).
std::optional< std::string > ecLevel() const
EcLevel, e.g. "30%", see also libzint docs for supported values per symbology.
std::optional< int > columns() const
Specify number of columns (e.g. for DataBarExpStk, PDF417).
std::optional< bool > forceSquare() const
DataMatrix: only consider square symbol versions.
std::optional< int > rows() const
Specify number of rows (e.g. for DataBarExpStk, PDF417).
std::optional< bool > extraEscapeMode() const
Enable extra escape sequences (see libzint EXTRA_ESCAPE_MODE documentation for details).
const BarcodeFormat & format() const noexcept
const std::string & options() const noexcept
std::optional< bool > readerInit() const
Set the "reader init" flag (most 2D symbologies).
CreatorOptions(CreatorOptions &&) noexcept
CreatorOptions(BarcodeFormat format, std::string options={})
Barcode CreateBarcodeFromText(std::string_view contents, const CreatorOptions &options)
Generate Barcode from unicode text.
BarcodeFormat
Enumerates barcode formats known to this package.
Definition BarcodeFormat.h:101
Barcode CreateBarcodeFromBytes(const void *data, int size, const CreatorOptions &options)
Generate Barcode from raw binary data.