Foxit PDF SDK

fs_barcode.h
Go to the documentation of this file.
1
16 #ifndef FS_BARCODE_H_
17 #define FS_BARCODE_H_
18
19 #include "fs_common.h"
20 #include "fs_image.h"
21
29 namespace foxit {
33 namespace common {
35 class Barcode FS_FINAL : public Base {
36 public:
42 typedef enum _Format {
44 e_FormatCode39 = 0,
46 e_FormatCode128 = 1,
48 e_FormatEAN8 = 2,
50 e_FormatUPCA = 3,
52 e_FormatEAN13 = 4,
54 e_FormatITF = 5,
56 e_FormatPDF417 = 6,
58 e_FormatQRCode = 7
59 } Format;
60
66 typedef enum _QRErrorCorrectionLevel {
68 e_QRCorrectionLevelLow = 0,
70 e_QRCorrectionLevelMedium = 1,
72 e_QRCorrectionLevelQuater = 2,
74 e_QRCorrectionLevelHigh = 3
75 } QRErrorCorrectionLevel;
76
78 Barcode();
79 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
80 explicit Barcode(FS_HANDLE handle);
81
83 ~Barcode();
89 Barcode(const Barcode& other);
97 Barcode& operator = (const Barcode& other);
98
106 bool operator == (const Barcode& other) const;
114 bool operator != (const Barcode& other) const;
115
123 bool IsEmpty() const;
124
147 common::Bitmap GenerateBitmap(const WString& info, Format format, int32 unit_width, int32 height,
148 QRErrorCorrectionLevel level);
149 };
150 } // namespace common
151 } // namespace foxit
152
153 #endif // FS_BARCODE_H_
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::common::Barcode::e_FormatQRCode
Barcode format: Quick Response Code.
Definition: fs_barcode.h:58
foxit::common::Barcode::e_QRCorrectionLevelQuater
The capability of recovery from 25% amounts of damage.
Definition: fs_barcode.h:72
foxit::common::Barcode::e_FormatEAN13
Barcode format: EAN-13 code.
Definition: fs_barcode.h:52
foxit::common::Barcode::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::common::Barcode::e_FormatCode128
Barcode format: Code128, including EAN128 code.
Definition: fs_barcode.h:46
fs_common.h
Header file for common definitions and classes.
foxit::common::Barcode::operator!=
bool operator!=(const Barcode &other) const
Not equal operator.
foxit::common::Barcode::~Barcode
~Barcode()
Destructor.
foxit::common::Barcode::e_QRCorrectionLevelLow
The capability of recovery from 7% amounts of damage.
Definition: fs_barcode.h:68
foxit::common::Barcode::operator=
Barcode & operator=(const Barcode &other)
Assign operator.
foxit::common::Barcode::QRErrorCorrectionLevel
QRErrorCorrectionLevel
Enumeration for format error correction level of QR Code.
Definition: fs_barcode.h:66
foxit::common::Barcode::GenerateBitmap
common::Bitmap GenerateBitmap(const WString &info, Format format, int32 unit_width, int32 height, QRErrorCorrectionLevel level)
Generate a barcode bitmap with a given information string and specified barcode format.
foxit::common::Barcode::e_QRCorrectionLevelHigh
The capability of recovery from 30% amounts of damage.
Definition: fs_barcode.h:74
foxit::common::Barcode::e_FormatPDF417
Barcode format: PDF-417 code.
Definition: fs_barcode.h:56
foxit::common::Barcode::e_QRCorrectionLevelMedium
The capability of recovery from 15% amounts of damage.
Definition: fs_barcode.h:70
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::common::Barcode::operator==
bool operator==(const Barcode &other) const
Equal operator.
foxit::common::Barcode::e_FormatEAN8
Barcode format: EAN-8 code.
Definition: fs_barcode.h:48
fs_image.h
Header file for image and bitmap related definitions and classes.
foxit::common::Barcode::Format
Format
Enumeration for barcode format.
Definition: fs_barcode.h:42
foxit::common::Barcode
Definition: fs_barcode.h:35
foxit::int32
FX_INT32 int32
32-bit signed integer.
Definition: fs_basictypes.h:193
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::common::Barcode::e_FormatUPCA
Barcode format: UPC-A code.
Definition: fs_barcode.h:50
foxit::common::Barcode::e_FormatCode39
Barcode format: standard 39 code.
Definition: fs_barcode.h:44
foxit::common::Barcode::e_FormatITF
Barcode format: ITF code.
Definition: fs_barcode.h:54
foxit::Base
Definition: fs_basictypes.h:451
foxit::common::Barcode::Barcode
Barcode()
Constructor.