rxing-wasm 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rxing_wasm.d.ts +182 -180
- package/rxing_wasm_bg.js +310 -277
- package/rxing_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/rxing_wasm.d.ts
CHANGED
|
@@ -5,29 +5,30 @@
|
|
|
5
5
|
* @param {string} data
|
|
6
6
|
* @param {number} width
|
|
7
7
|
* @param {number} height
|
|
8
|
-
* @param {
|
|
8
|
+
* @param {BarcodeFormat} bc_type
|
|
9
9
|
* @returns {string}
|
|
10
10
|
*/
|
|
11
|
-
export function encode_barcode(data: string, width: number, height: number, bc_type:
|
|
11
|
+
export function encode_barcode(data: string, width: number, height: number, bc_type: BarcodeFormat): string;
|
|
12
12
|
/**
|
|
13
13
|
* Encode a barcode with the given data, dimensions, and type, use the given encoding hints
|
|
14
14
|
* @param {string} data
|
|
15
15
|
* @param {number} width
|
|
16
16
|
* @param {number} height
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {BarcodeFormat} bc_type
|
|
18
18
|
* @param {EncodeHintDictionary} hints
|
|
19
19
|
* @returns {string}
|
|
20
20
|
*/
|
|
21
|
-
export function encode_barcode_with_hints(data: string, width: number, height: number, bc_type:
|
|
21
|
+
export function encode_barcode_with_hints(data: string, width: number, height: number, bc_type: BarcodeFormat, hints: EncodeHintDictionary): string;
|
|
22
22
|
/**
|
|
23
23
|
* Decode a barcode from an array of 8bit luma data
|
|
24
24
|
* @param {Uint8Array} data
|
|
25
25
|
* @param {number} width
|
|
26
26
|
* @param {number} height
|
|
27
|
-
* @param {boolean | undefined} try_harder
|
|
27
|
+
* @param {boolean | undefined} [try_harder]
|
|
28
|
+
* @param {boolean | undefined} [filter_image]
|
|
28
29
|
* @returns {BarcodeResult}
|
|
29
30
|
*/
|
|
30
|
-
export function decode_barcode(data: Uint8Array, width: number, height: number, try_harder?: boolean): BarcodeResult;
|
|
31
|
+
export function decode_barcode(data: Uint8Array, width: number, height: number, try_harder?: boolean, filter_image?: boolean): BarcodeResult;
|
|
31
32
|
/**
|
|
32
33
|
* Convert a javascript image context's data into luma 8.
|
|
33
34
|
*
|
|
@@ -46,7 +47,7 @@ export function convert_js_image_to_luma(data: Uint8Array): Uint8Array;
|
|
|
46
47
|
* @param {Uint32Array} data
|
|
47
48
|
* @param {number} width
|
|
48
49
|
* @param {number} height
|
|
49
|
-
* @param {boolean | undefined} try_harder
|
|
50
|
+
* @param {boolean | undefined} [try_harder]
|
|
50
51
|
* @returns {BarcodeResult}
|
|
51
52
|
*/
|
|
52
53
|
export function decode_barcode_rgb(data: Uint32Array, width: number, height: number, try_harder?: boolean): BarcodeResult;
|
|
@@ -55,9 +56,10 @@ export function decode_barcode_rgb(data: Uint32Array, width: number, height: num
|
|
|
55
56
|
* @param {number} width
|
|
56
57
|
* @param {number} height
|
|
57
58
|
* @param {DecodeHintDictionary} hints
|
|
59
|
+
* @param {boolean | undefined} [filter_image]
|
|
58
60
|
* @returns {BarcodeResult}
|
|
59
61
|
*/
|
|
60
|
-
export function decode_barcode_with_hints(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary): BarcodeResult;
|
|
62
|
+
export function decode_barcode_with_hints(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary, filter_image?: boolean): BarcodeResult;
|
|
61
63
|
/**
|
|
62
64
|
* @param {Uint8Array} data
|
|
63
65
|
* @param {number} width
|
|
@@ -68,175 +70,99 @@ export function decode_barcode_with_hints(data: Uint8Array, width: number, heigh
|
|
|
68
70
|
export function decode_multi(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary): MultiDecodeResult;
|
|
69
71
|
/**
|
|
70
72
|
*/
|
|
71
|
-
export enum
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* * Specifies what degree of error correction to use, for example in QR Codes.
|
|
75
|
-
* * Type depends on the encoder. For example for QR codes it's type
|
|
76
|
-
* * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
|
|
77
|
-
* * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
|
|
78
|
-
* * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
|
|
79
|
-
* * In all cases, it can also be a {@link String} representation of the desired value as well.
|
|
80
|
-
* * Note: an Aztec symbol should have a minimum of 25% EC words.
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
ErrorCorrection = 0,
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* * Specifies what character encoding to use where applicable (type {@link String})
|
|
87
|
-
*
|
|
88
|
-
*/
|
|
89
|
-
CharacterSet = 1,
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
* * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
DataMatrixShape = 2,
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
* * Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or "true" or "false"
|
|
99
|
-
* * {@link String } value).
|
|
100
|
-
* * The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1
|
|
101
|
-
* * character set via ECIs.
|
|
102
|
-
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
103
|
-
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
104
|
-
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
105
|
-
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
106
|
-
* * Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case
|
|
107
|
-
* * group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords
|
|
108
|
-
* * for the purpose of delimiting AIs.
|
|
109
|
-
* * This option and {@link #FORCE_C40} are mutually exclusive.
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
DataMatrixCompact = 3,
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
* * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
116
|
-
* *
|
|
117
|
-
* * @deprecated use width/height params in
|
|
118
|
-
* * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
|
|
119
|
-
*
|
|
120
|
-
*/
|
|
121
|
-
MinSize = 4,
|
|
122
|
-
/**
|
|
123
|
-
*
|
|
124
|
-
* * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
125
|
-
* *
|
|
126
|
-
* * @deprecated without replacement
|
|
127
|
-
*
|
|
128
|
-
*/
|
|
129
|
-
MaxSize = 5,
|
|
73
|
+
export enum DecodeHintTypes {
|
|
130
74
|
/**
|
|
131
75
|
*
|
|
132
|
-
* *
|
|
133
|
-
* * by format; for example it controls margin before and after the barcode horizontally for
|
|
134
|
-
* * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
76
|
+
* * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
|
|
135
77
|
*
|
|
136
78
|
*/
|
|
137
|
-
|
|
79
|
+
Other = 0,
|
|
138
80
|
/**
|
|
139
81
|
*
|
|
140
|
-
* *
|
|
141
|
-
* * {@link
|
|
82
|
+
* * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
|
|
83
|
+
* * use {@link Boolean#TRUE}.
|
|
142
84
|
*
|
|
143
85
|
*/
|
|
144
|
-
|
|
86
|
+
PureBarcode = 1,
|
|
145
87
|
/**
|
|
146
88
|
*
|
|
147
|
-
* *
|
|
148
|
-
* * {@link
|
|
149
|
-
* * enum values).
|
|
89
|
+
* * Image is known to be of one of a few possible formats.
|
|
90
|
+
* * Maps to a {@link List} of {@link BarcodeFormat}s.
|
|
150
91
|
*
|
|
151
92
|
*/
|
|
152
|
-
|
|
93
|
+
PossibleFormats = 2,
|
|
153
94
|
/**
|
|
154
95
|
*
|
|
155
|
-
* *
|
|
156
|
-
* * {@link
|
|
96
|
+
* * Spend more time to try to find a barcode; optimize for accuracy, not speed.
|
|
97
|
+
* * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
|
|
157
98
|
*
|
|
158
99
|
*/
|
|
159
|
-
|
|
100
|
+
TryHarder = 3,
|
|
160
101
|
/**
|
|
161
102
|
*
|
|
162
|
-
* * Specifies
|
|
163
|
-
* * {@link String} value).
|
|
164
|
-
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
165
|
-
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
166
|
-
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
167
|
-
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
103
|
+
* * Specifies what character encoding to use when decoding, where applicable (type String)
|
|
168
104
|
*
|
|
169
105
|
*/
|
|
170
|
-
|
|
106
|
+
CharacterSet = 4,
|
|
171
107
|
/**
|
|
172
108
|
*
|
|
173
|
-
* *
|
|
174
|
-
* * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
|
|
175
|
-
* * 0 indicates to use the minimum number of layers (the default).
|
|
176
|
-
* * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
|
|
177
|
-
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
109
|
+
* * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
|
|
178
110
|
*
|
|
179
111
|
*/
|
|
180
|
-
|
|
112
|
+
AllowedLengths = 5,
|
|
181
113
|
/**
|
|
182
114
|
*
|
|
183
|
-
* *
|
|
184
|
-
* *
|
|
115
|
+
* * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
|
|
116
|
+
* * use {@link Boolean#TRUE}.
|
|
185
117
|
*
|
|
186
118
|
*/
|
|
187
|
-
|
|
119
|
+
AssumeCode39CheckDigit = 6,
|
|
188
120
|
/**
|
|
189
121
|
*
|
|
190
|
-
* *
|
|
191
|
-
* *
|
|
192
|
-
* *
|
|
193
|
-
* * * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
122
|
+
* * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
|
|
123
|
+
* * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
|
|
124
|
+
* * use {@link Boolean#TRUE}.
|
|
194
125
|
*
|
|
195
126
|
*/
|
|
196
|
-
|
|
127
|
+
AssumeGs1 = 7,
|
|
197
128
|
/**
|
|
198
129
|
*
|
|
199
|
-
* *
|
|
200
|
-
* *
|
|
201
|
-
* *
|
|
202
|
-
* * for characters in the input that are not in the ISO-8859-1 character set. Based on experience,
|
|
203
|
-
* * some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can
|
|
204
|
-
* * be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
|
|
130
|
+
* * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
|
|
131
|
+
* * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
|
|
132
|
+
* * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
|
|
205
133
|
*
|
|
206
134
|
*/
|
|
207
|
-
|
|
135
|
+
ReturnCodabarStartEnd = 8,
|
|
208
136
|
/**
|
|
209
137
|
*
|
|
210
|
-
* *
|
|
211
|
-
* * {@link
|
|
138
|
+
* * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
|
|
139
|
+
* * is found. Maps to a {@link RXingResultPointCallback}.
|
|
212
140
|
*
|
|
213
141
|
*/
|
|
214
|
-
|
|
142
|
+
NeedResultPointCallback = 9,
|
|
215
143
|
/**
|
|
216
144
|
*
|
|
217
|
-
* *
|
|
218
|
-
* *
|
|
219
|
-
* *
|
|
145
|
+
* * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
|
|
146
|
+
* * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
|
|
147
|
+
* * If it is optional to have an extension, do not set this hint. If this is set,
|
|
148
|
+
* * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
|
|
149
|
+
* * at all.
|
|
220
150
|
*
|
|
221
151
|
*/
|
|
222
|
-
|
|
152
|
+
AllowedEanExtensions = 10,
|
|
223
153
|
/**
|
|
224
154
|
*
|
|
225
|
-
* *
|
|
226
|
-
* *
|
|
155
|
+
* * If true, also tries to decode as inverted image. All configured decoders are simply called a
|
|
156
|
+
* * second time with an inverted image. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
|
|
227
157
|
*
|
|
228
158
|
*/
|
|
229
|
-
|
|
159
|
+
AlsoInverted = 11,
|
|
230
160
|
/**
|
|
231
161
|
*
|
|
232
|
-
* *
|
|
233
|
-
* * {@link String } value).
|
|
234
|
-
* * This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually
|
|
235
|
-
* * exclusive.
|
|
162
|
+
* * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
|
|
236
163
|
*
|
|
237
164
|
*/
|
|
238
|
-
|
|
239
|
-
TelepenAsNumeric = 19,
|
|
165
|
+
TelepenAsNumeric = 12,
|
|
240
166
|
}
|
|
241
167
|
/**
|
|
242
168
|
* Available barcode types
|
|
@@ -317,99 +243,175 @@ export enum BarcodeFormat {
|
|
|
317
243
|
}
|
|
318
244
|
/**
|
|
319
245
|
*/
|
|
320
|
-
export enum
|
|
246
|
+
export enum EncodeHintTypes {
|
|
321
247
|
/**
|
|
322
248
|
*
|
|
323
|
-
* *
|
|
249
|
+
* * Specifies what degree of error correction to use, for example in QR Codes.
|
|
250
|
+
* * Type depends on the encoder. For example for QR codes it's type
|
|
251
|
+
* * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
|
|
252
|
+
* * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
|
|
253
|
+
* * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
|
|
254
|
+
* * In all cases, it can also be a {@link String} representation of the desired value as well.
|
|
255
|
+
* * Note: an Aztec symbol should have a minimum of 25% EC words.
|
|
324
256
|
*
|
|
325
257
|
*/
|
|
326
|
-
|
|
258
|
+
ErrorCorrection = 0,
|
|
327
259
|
/**
|
|
328
260
|
*
|
|
329
|
-
* *
|
|
330
|
-
* * use {@link Boolean#TRUE}.
|
|
261
|
+
* * Specifies what character encoding to use where applicable (type {@link String})
|
|
331
262
|
*
|
|
332
263
|
*/
|
|
333
|
-
|
|
264
|
+
CharacterSet = 1,
|
|
334
265
|
/**
|
|
335
266
|
*
|
|
336
|
-
* *
|
|
337
|
-
* * Maps to a {@link List} of {@link BarcodeFormat}s.
|
|
267
|
+
* * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
|
|
338
268
|
*
|
|
339
269
|
*/
|
|
340
|
-
|
|
270
|
+
DataMatrixShape = 2,
|
|
341
271
|
/**
|
|
342
272
|
*
|
|
343
|
-
* *
|
|
344
|
-
* *
|
|
273
|
+
* * Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or "true" or "false"
|
|
274
|
+
* * {@link String } value).
|
|
275
|
+
* * The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1
|
|
276
|
+
* * character set via ECIs.
|
|
277
|
+
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
278
|
+
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
279
|
+
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
280
|
+
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
281
|
+
* * Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case
|
|
282
|
+
* * group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords
|
|
283
|
+
* * for the purpose of delimiting AIs.
|
|
284
|
+
* * This option and {@link #FORCE_C40} are mutually exclusive.
|
|
345
285
|
*
|
|
346
286
|
*/
|
|
347
|
-
|
|
287
|
+
DataMatrixCompact = 3,
|
|
348
288
|
/**
|
|
349
289
|
*
|
|
350
|
-
* * Specifies
|
|
290
|
+
* * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
291
|
+
* *
|
|
292
|
+
* * @deprecated use width/height params in
|
|
293
|
+
* * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
|
|
351
294
|
*
|
|
352
295
|
*/
|
|
353
|
-
|
|
296
|
+
MinSize = 4,
|
|
354
297
|
/**
|
|
355
298
|
*
|
|
356
|
-
* *
|
|
299
|
+
* * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
300
|
+
* *
|
|
301
|
+
* * @deprecated without replacement
|
|
357
302
|
*
|
|
358
303
|
*/
|
|
359
|
-
|
|
304
|
+
MaxSize = 5,
|
|
360
305
|
/**
|
|
361
306
|
*
|
|
362
|
-
* *
|
|
363
|
-
* *
|
|
307
|
+
* * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
|
|
308
|
+
* * by format; for example it controls margin before and after the barcode horizontally for
|
|
309
|
+
* * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
364
310
|
*
|
|
365
311
|
*/
|
|
366
|
-
|
|
312
|
+
MARGIN = 6,
|
|
367
313
|
/**
|
|
368
314
|
*
|
|
369
|
-
* *
|
|
370
|
-
* *
|
|
371
|
-
* * use {@link Boolean#TRUE}.
|
|
315
|
+
* * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
|
|
316
|
+
* * {@link String} value).
|
|
372
317
|
*
|
|
373
318
|
*/
|
|
374
|
-
|
|
319
|
+
Pdf417Compact = 7,
|
|
375
320
|
/**
|
|
376
321
|
*
|
|
377
|
-
* *
|
|
378
|
-
* *
|
|
379
|
-
* *
|
|
322
|
+
* * Specifies what compaction mode to use for PDF417 (type
|
|
323
|
+
* * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its
|
|
324
|
+
* * enum values).
|
|
380
325
|
*
|
|
381
326
|
*/
|
|
382
|
-
|
|
327
|
+
Pdf417Compaction = 8,
|
|
383
328
|
/**
|
|
384
329
|
*
|
|
385
|
-
* *
|
|
386
|
-
* *
|
|
330
|
+
* * Specifies the minimum and maximum number of rows and columns for PDF417 (type
|
|
331
|
+
* * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
|
|
387
332
|
*
|
|
388
333
|
*/
|
|
389
|
-
|
|
334
|
+
Pdf417Dimensions = 9,
|
|
390
335
|
/**
|
|
391
336
|
*
|
|
392
|
-
* *
|
|
393
|
-
* *
|
|
394
|
-
* *
|
|
395
|
-
* *
|
|
396
|
-
* *
|
|
337
|
+
* * Specifies whether to automatically insert ECIs when encoding PDF417 (type {@link Boolean}, or "true" or "false"
|
|
338
|
+
* * {@link String} value).
|
|
339
|
+
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
340
|
+
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
341
|
+
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
342
|
+
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
397
343
|
*
|
|
398
344
|
*/
|
|
399
|
-
|
|
345
|
+
Pdf417AutoEci = 10,
|
|
400
346
|
/**
|
|
401
347
|
*
|
|
402
|
-
* *
|
|
403
|
-
* *
|
|
348
|
+
* * Specifies the required number of layers for an Aztec code.
|
|
349
|
+
* * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
|
|
350
|
+
* * 0 indicates to use the minimum number of layers (the default).
|
|
351
|
+
* * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
|
|
352
|
+
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
404
353
|
*
|
|
405
354
|
*/
|
|
406
|
-
|
|
355
|
+
AztecLayers = 11,
|
|
407
356
|
/**
|
|
408
357
|
*
|
|
409
|
-
* *
|
|
358
|
+
* * Specifies the exact version of QR code to be encoded.
|
|
359
|
+
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
410
360
|
*
|
|
411
361
|
*/
|
|
412
|
-
|
|
362
|
+
QrVersion = 12,
|
|
363
|
+
/**
|
|
364
|
+
*
|
|
365
|
+
* * Specifies the QR code mask pattern to be used. Allowed values are
|
|
366
|
+
* * 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select
|
|
367
|
+
* * the optimal mask pattern.
|
|
368
|
+
* * * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
369
|
+
*
|
|
370
|
+
*/
|
|
371
|
+
QrMaskPattern = 13,
|
|
372
|
+
/**
|
|
373
|
+
*
|
|
374
|
+
* * Specifies whether to use compact mode for QR code (type {@link Boolean}, or "true" or "false"
|
|
375
|
+
* * {@link String } value).
|
|
376
|
+
* * Please note that when compaction is performed, the most compact character encoding is chosen
|
|
377
|
+
* * for characters in the input that are not in the ISO-8859-1 character set. Based on experience,
|
|
378
|
+
* * some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can
|
|
379
|
+
* * be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
|
|
380
|
+
*
|
|
381
|
+
*/
|
|
382
|
+
QrCompact = 14,
|
|
383
|
+
/**
|
|
384
|
+
*
|
|
385
|
+
* * Specifies whether the data should be encoded to the GS1 standard (type {@link Boolean}, or "true" or "false"
|
|
386
|
+
* * {@link String } value).
|
|
387
|
+
*
|
|
388
|
+
*/
|
|
389
|
+
Gs1Format = 15,
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
* * Forces which encoding will be used. Currently only used for Code-128 code sets (Type {@link String}).
|
|
393
|
+
* * Valid values are "A", "B", "C".
|
|
394
|
+
* * This option and {@link #CODE128_COMPACT} are mutually exclusive.
|
|
395
|
+
*
|
|
396
|
+
*/
|
|
397
|
+
ForceCodeSet = 16,
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* * Forces C40 encoding for data-matrix (type {@link Boolean}, or "true" or "false") {@link String } value). This
|
|
401
|
+
* * option and {@link #DATA_MATRIX_COMPACT} are mutually exclusive.
|
|
402
|
+
*
|
|
403
|
+
*/
|
|
404
|
+
ForceC40 = 17,
|
|
405
|
+
/**
|
|
406
|
+
*
|
|
407
|
+
* * Specifies whether to use compact mode for Code-128 code (type {@link Boolean}, or "true" or "false"
|
|
408
|
+
* * {@link String } value).
|
|
409
|
+
* * This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually
|
|
410
|
+
* * exclusive.
|
|
411
|
+
*
|
|
412
|
+
*/
|
|
413
|
+
Code128Compact = 18,
|
|
414
|
+
TelepenAsNumeric = 19,
|
|
413
415
|
}
|
|
414
416
|
/**
|
|
415
417
|
*/
|
|
@@ -420,9 +422,9 @@ export class BarcodeResult {
|
|
|
420
422
|
*/
|
|
421
423
|
timestamp(): number;
|
|
422
424
|
/**
|
|
423
|
-
* @returns {
|
|
425
|
+
* @returns {BarcodeFormat}
|
|
424
426
|
*/
|
|
425
|
-
format():
|
|
427
|
+
format(): BarcodeFormat;
|
|
426
428
|
/**
|
|
427
429
|
* Each pair of f32 values is an (x,y) point
|
|
428
430
|
* @returns {Float32Array}
|
|
@@ -453,21 +455,21 @@ export class DecodeHintDictionary {
|
|
|
453
455
|
*/
|
|
454
456
|
constructor();
|
|
455
457
|
/**
|
|
456
|
-
* @param {
|
|
458
|
+
* @param {DecodeHintTypes} hint
|
|
457
459
|
* @returns {string}
|
|
458
460
|
*/
|
|
459
|
-
get_hint(hint:
|
|
461
|
+
get_hint(hint: DecodeHintTypes): string;
|
|
460
462
|
/**
|
|
461
|
-
* @param {
|
|
463
|
+
* @param {DecodeHintTypes} hint
|
|
462
464
|
* @param {string} value
|
|
463
465
|
* @returns {boolean}
|
|
464
466
|
*/
|
|
465
|
-
set_hint(hint:
|
|
467
|
+
set_hint(hint: DecodeHintTypes, value: string): boolean;
|
|
466
468
|
/**
|
|
467
|
-
* @param {
|
|
469
|
+
* @param {DecodeHintTypes} hint
|
|
468
470
|
* @returns {boolean}
|
|
469
471
|
*/
|
|
470
|
-
remove_hint(hint:
|
|
472
|
+
remove_hint(hint: DecodeHintTypes): boolean;
|
|
471
473
|
}
|
|
472
474
|
/**
|
|
473
475
|
*/
|
|
@@ -477,21 +479,21 @@ export class EncodeHintDictionary {
|
|
|
477
479
|
*/
|
|
478
480
|
constructor();
|
|
479
481
|
/**
|
|
480
|
-
* @param {
|
|
482
|
+
* @param {EncodeHintTypes} hint
|
|
481
483
|
* @returns {string}
|
|
482
484
|
*/
|
|
483
|
-
get_hint(hint:
|
|
485
|
+
get_hint(hint: EncodeHintTypes): string;
|
|
484
486
|
/**
|
|
485
|
-
* @param {
|
|
487
|
+
* @param {EncodeHintTypes} hint
|
|
486
488
|
* @param {string} value
|
|
487
489
|
* @returns {boolean}
|
|
488
490
|
*/
|
|
489
|
-
set_hint(hint:
|
|
491
|
+
set_hint(hint: EncodeHintTypes, value: string): boolean;
|
|
490
492
|
/**
|
|
491
|
-
* @param {
|
|
493
|
+
* @param {EncodeHintTypes} hint
|
|
492
494
|
* @returns {boolean}
|
|
493
495
|
*/
|
|
494
|
-
remove_hint(hint:
|
|
496
|
+
remove_hint(hint: EncodeHintTypes): boolean;
|
|
495
497
|
}
|
|
496
498
|
/**
|
|
497
499
|
*/
|