rxing-wasm 0.2.6 → 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 +180 -180
- package/rxing_wasm_bg.js +307 -276
- package/rxing_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/rxing_wasm.d.ts
CHANGED
|
@@ -5,27 +5,27 @@
|
|
|
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
|
|
28
|
-
* @param {boolean | undefined} filter_image
|
|
27
|
+
* @param {boolean | undefined} [try_harder]
|
|
28
|
+
* @param {boolean | undefined} [filter_image]
|
|
29
29
|
* @returns {BarcodeResult}
|
|
30
30
|
*/
|
|
31
31
|
export function decode_barcode(data: Uint8Array, width: number, height: number, try_harder?: boolean, filter_image?: boolean): BarcodeResult;
|
|
@@ -47,7 +47,7 @@ export function convert_js_image_to_luma(data: Uint8Array): Uint8Array;
|
|
|
47
47
|
* @param {Uint32Array} data
|
|
48
48
|
* @param {number} width
|
|
49
49
|
* @param {number} height
|
|
50
|
-
* @param {boolean | undefined} try_harder
|
|
50
|
+
* @param {boolean | undefined} [try_harder]
|
|
51
51
|
* @returns {BarcodeResult}
|
|
52
52
|
*/
|
|
53
53
|
export function decode_barcode_rgb(data: Uint32Array, width: number, height: number, try_harder?: boolean): BarcodeResult;
|
|
@@ -56,7 +56,7 @@ export function decode_barcode_rgb(data: Uint32Array, width: number, height: num
|
|
|
56
56
|
* @param {number} width
|
|
57
57
|
* @param {number} height
|
|
58
58
|
* @param {DecodeHintDictionary} hints
|
|
59
|
-
* @param {boolean | undefined} filter_image
|
|
59
|
+
* @param {boolean | undefined} [filter_image]
|
|
60
60
|
* @returns {BarcodeResult}
|
|
61
61
|
*/
|
|
62
62
|
export function decode_barcode_with_hints(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary, filter_image?: boolean): BarcodeResult;
|
|
@@ -70,175 +70,99 @@ export function decode_barcode_with_hints(data: Uint8Array, width: number, heigh
|
|
|
70
70
|
export function decode_multi(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary): MultiDecodeResult;
|
|
71
71
|
/**
|
|
72
72
|
*/
|
|
73
|
-
export enum
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* * Specifies what degree of error correction to use, for example in QR Codes.
|
|
77
|
-
* * Type depends on the encoder. For example for QR codes it's type
|
|
78
|
-
* * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
|
|
79
|
-
* * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
|
|
80
|
-
* * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
|
|
81
|
-
* * In all cases, it can also be a {@link String} representation of the desired value as well.
|
|
82
|
-
* * Note: an Aztec symbol should have a minimum of 25% EC words.
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
85
|
-
ErrorCorrection = 0,
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* * Specifies what character encoding to use where applicable (type {@link String})
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
CharacterSet = 1,
|
|
92
|
-
/**
|
|
93
|
-
*
|
|
94
|
-
* * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
|
|
95
|
-
*
|
|
96
|
-
*/
|
|
97
|
-
DataMatrixShape = 2,
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* * Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or "true" or "false"
|
|
101
|
-
* * {@link String } value).
|
|
102
|
-
* * The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1
|
|
103
|
-
* * character set via ECIs.
|
|
104
|
-
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
105
|
-
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
106
|
-
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
107
|
-
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
108
|
-
* * Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case
|
|
109
|
-
* * group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords
|
|
110
|
-
* * for the purpose of delimiting AIs.
|
|
111
|
-
* * This option and {@link #FORCE_C40} are mutually exclusive.
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
114
|
-
DataMatrixCompact = 3,
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
* * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
118
|
-
* *
|
|
119
|
-
* * @deprecated use width/height params in
|
|
120
|
-
* * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
123
|
-
MinSize = 4,
|
|
124
|
-
/**
|
|
125
|
-
*
|
|
126
|
-
* * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
127
|
-
* *
|
|
128
|
-
* * @deprecated without replacement
|
|
129
|
-
*
|
|
130
|
-
*/
|
|
131
|
-
MaxSize = 5,
|
|
73
|
+
export enum DecodeHintTypes {
|
|
132
74
|
/**
|
|
133
75
|
*
|
|
134
|
-
* *
|
|
135
|
-
* * by format; for example it controls margin before and after the barcode horizontally for
|
|
136
|
-
* * 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}.
|
|
137
77
|
*
|
|
138
78
|
*/
|
|
139
|
-
|
|
79
|
+
Other = 0,
|
|
140
80
|
/**
|
|
141
81
|
*
|
|
142
|
-
* *
|
|
143
|
-
* * {@link
|
|
82
|
+
* * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
|
|
83
|
+
* * use {@link Boolean#TRUE}.
|
|
144
84
|
*
|
|
145
85
|
*/
|
|
146
|
-
|
|
86
|
+
PureBarcode = 1,
|
|
147
87
|
/**
|
|
148
88
|
*
|
|
149
|
-
* *
|
|
150
|
-
* * {@link
|
|
151
|
-
* * 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.
|
|
152
91
|
*
|
|
153
92
|
*/
|
|
154
|
-
|
|
93
|
+
PossibleFormats = 2,
|
|
155
94
|
/**
|
|
156
95
|
*
|
|
157
|
-
* *
|
|
158
|
-
* * {@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}.
|
|
159
98
|
*
|
|
160
99
|
*/
|
|
161
|
-
|
|
100
|
+
TryHarder = 3,
|
|
162
101
|
/**
|
|
163
102
|
*
|
|
164
|
-
* * Specifies
|
|
165
|
-
* * {@link String} value).
|
|
166
|
-
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
167
|
-
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
168
|
-
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
169
|
-
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
103
|
+
* * Specifies what character encoding to use when decoding, where applicable (type String)
|
|
170
104
|
*
|
|
171
105
|
*/
|
|
172
|
-
|
|
106
|
+
CharacterSet = 4,
|
|
173
107
|
/**
|
|
174
108
|
*
|
|
175
|
-
* *
|
|
176
|
-
* * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
|
|
177
|
-
* * 0 indicates to use the minimum number of layers (the default).
|
|
178
|
-
* * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
|
|
179
|
-
* * (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[]}.
|
|
180
110
|
*
|
|
181
111
|
*/
|
|
182
|
-
|
|
112
|
+
AllowedLengths = 5,
|
|
183
113
|
/**
|
|
184
114
|
*
|
|
185
|
-
* *
|
|
186
|
-
* *
|
|
115
|
+
* * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
|
|
116
|
+
* * use {@link Boolean#TRUE}.
|
|
187
117
|
*
|
|
188
118
|
*/
|
|
189
|
-
|
|
119
|
+
AssumeCode39CheckDigit = 6,
|
|
190
120
|
/**
|
|
191
121
|
*
|
|
192
|
-
* *
|
|
193
|
-
* *
|
|
194
|
-
* *
|
|
195
|
-
* * * (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}.
|
|
196
125
|
*
|
|
197
126
|
*/
|
|
198
|
-
|
|
127
|
+
AssumeGs1 = 7,
|
|
199
128
|
/**
|
|
200
129
|
*
|
|
201
|
-
* *
|
|
202
|
-
* *
|
|
203
|
-
* *
|
|
204
|
-
* * for characters in the input that are not in the ISO-8859-1 character set. Based on experience,
|
|
205
|
-
* * some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can
|
|
206
|
-
* * 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}.
|
|
207
133
|
*
|
|
208
134
|
*/
|
|
209
|
-
|
|
135
|
+
ReturnCodabarStartEnd = 8,
|
|
210
136
|
/**
|
|
211
137
|
*
|
|
212
|
-
* *
|
|
213
|
-
* * {@link
|
|
138
|
+
* * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
|
|
139
|
+
* * is found. Maps to a {@link RXingResultPointCallback}.
|
|
214
140
|
*
|
|
215
141
|
*/
|
|
216
|
-
|
|
142
|
+
NeedResultPointCallback = 9,
|
|
217
143
|
/**
|
|
218
144
|
*
|
|
219
|
-
* *
|
|
220
|
-
* *
|
|
221
|
-
* *
|
|
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.
|
|
222
150
|
*
|
|
223
151
|
*/
|
|
224
|
-
|
|
152
|
+
AllowedEanExtensions = 10,
|
|
225
153
|
/**
|
|
226
154
|
*
|
|
227
|
-
* *
|
|
228
|
-
* *
|
|
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}.
|
|
229
157
|
*
|
|
230
158
|
*/
|
|
231
|
-
|
|
159
|
+
AlsoInverted = 11,
|
|
232
160
|
/**
|
|
233
161
|
*
|
|
234
|
-
* *
|
|
235
|
-
* * {@link String } value).
|
|
236
|
-
* * This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually
|
|
237
|
-
* * exclusive.
|
|
162
|
+
* * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
|
|
238
163
|
*
|
|
239
164
|
*/
|
|
240
|
-
|
|
241
|
-
TelepenAsNumeric = 19,
|
|
165
|
+
TelepenAsNumeric = 12,
|
|
242
166
|
}
|
|
243
167
|
/**
|
|
244
168
|
* Available barcode types
|
|
@@ -319,99 +243,175 @@ export enum BarcodeFormat {
|
|
|
319
243
|
}
|
|
320
244
|
/**
|
|
321
245
|
*/
|
|
322
|
-
export enum
|
|
246
|
+
export enum EncodeHintTypes {
|
|
323
247
|
/**
|
|
324
248
|
*
|
|
325
|
-
* *
|
|
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.
|
|
326
256
|
*
|
|
327
257
|
*/
|
|
328
|
-
|
|
258
|
+
ErrorCorrection = 0,
|
|
329
259
|
/**
|
|
330
260
|
*
|
|
331
|
-
* *
|
|
332
|
-
* * use {@link Boolean#TRUE}.
|
|
261
|
+
* * Specifies what character encoding to use where applicable (type {@link String})
|
|
333
262
|
*
|
|
334
263
|
*/
|
|
335
|
-
|
|
264
|
+
CharacterSet = 1,
|
|
336
265
|
/**
|
|
337
266
|
*
|
|
338
|
-
* *
|
|
339
|
-
* * 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})
|
|
340
268
|
*
|
|
341
269
|
*/
|
|
342
|
-
|
|
270
|
+
DataMatrixShape = 2,
|
|
343
271
|
/**
|
|
344
272
|
*
|
|
345
|
-
* *
|
|
346
|
-
* *
|
|
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.
|
|
347
285
|
*
|
|
348
286
|
*/
|
|
349
|
-
|
|
287
|
+
DataMatrixCompact = 3,
|
|
350
288
|
/**
|
|
351
289
|
*
|
|
352
|
-
* * 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)}
|
|
353
294
|
*
|
|
354
295
|
*/
|
|
355
|
-
|
|
296
|
+
MinSize = 4,
|
|
356
297
|
/**
|
|
357
298
|
*
|
|
358
|
-
* *
|
|
299
|
+
* * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
300
|
+
* *
|
|
301
|
+
* * @deprecated without replacement
|
|
359
302
|
*
|
|
360
303
|
*/
|
|
361
|
-
|
|
304
|
+
MaxSize = 5,
|
|
362
305
|
/**
|
|
363
306
|
*
|
|
364
|
-
* *
|
|
365
|
-
* *
|
|
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).
|
|
366
310
|
*
|
|
367
311
|
*/
|
|
368
|
-
|
|
312
|
+
MARGIN = 6,
|
|
369
313
|
/**
|
|
370
314
|
*
|
|
371
|
-
* *
|
|
372
|
-
* *
|
|
373
|
-
* * use {@link Boolean#TRUE}.
|
|
315
|
+
* * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
|
|
316
|
+
* * {@link String} value).
|
|
374
317
|
*
|
|
375
318
|
*/
|
|
376
|
-
|
|
319
|
+
Pdf417Compact = 7,
|
|
377
320
|
/**
|
|
378
321
|
*
|
|
379
|
-
* *
|
|
380
|
-
* *
|
|
381
|
-
* *
|
|
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).
|
|
382
325
|
*
|
|
383
326
|
*/
|
|
384
|
-
|
|
327
|
+
Pdf417Compaction = 8,
|
|
385
328
|
/**
|
|
386
329
|
*
|
|
387
|
-
* *
|
|
388
|
-
* *
|
|
330
|
+
* * Specifies the minimum and maximum number of rows and columns for PDF417 (type
|
|
331
|
+
* * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
|
|
389
332
|
*
|
|
390
333
|
*/
|
|
391
|
-
|
|
334
|
+
Pdf417Dimensions = 9,
|
|
392
335
|
/**
|
|
393
336
|
*
|
|
394
|
-
* *
|
|
395
|
-
* *
|
|
396
|
-
* *
|
|
397
|
-
* *
|
|
398
|
-
* *
|
|
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.
|
|
399
343
|
*
|
|
400
344
|
*/
|
|
401
|
-
|
|
345
|
+
Pdf417AutoEci = 10,
|
|
402
346
|
/**
|
|
403
347
|
*
|
|
404
|
-
* *
|
|
405
|
-
* *
|
|
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).
|
|
406
353
|
*
|
|
407
354
|
*/
|
|
408
|
-
|
|
355
|
+
AztecLayers = 11,
|
|
409
356
|
/**
|
|
410
357
|
*
|
|
411
|
-
* *
|
|
358
|
+
* * Specifies the exact version of QR code to be encoded.
|
|
359
|
+
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
412
360
|
*
|
|
413
361
|
*/
|
|
414
|
-
|
|
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,
|
|
415
415
|
}
|
|
416
416
|
/**
|
|
417
417
|
*/
|
|
@@ -422,9 +422,9 @@ export class BarcodeResult {
|
|
|
422
422
|
*/
|
|
423
423
|
timestamp(): number;
|
|
424
424
|
/**
|
|
425
|
-
* @returns {
|
|
425
|
+
* @returns {BarcodeFormat}
|
|
426
426
|
*/
|
|
427
|
-
format():
|
|
427
|
+
format(): BarcodeFormat;
|
|
428
428
|
/**
|
|
429
429
|
* Each pair of f32 values is an (x,y) point
|
|
430
430
|
* @returns {Float32Array}
|
|
@@ -455,21 +455,21 @@ export class DecodeHintDictionary {
|
|
|
455
455
|
*/
|
|
456
456
|
constructor();
|
|
457
457
|
/**
|
|
458
|
-
* @param {
|
|
458
|
+
* @param {DecodeHintTypes} hint
|
|
459
459
|
* @returns {string}
|
|
460
460
|
*/
|
|
461
|
-
get_hint(hint:
|
|
461
|
+
get_hint(hint: DecodeHintTypes): string;
|
|
462
462
|
/**
|
|
463
|
-
* @param {
|
|
463
|
+
* @param {DecodeHintTypes} hint
|
|
464
464
|
* @param {string} value
|
|
465
465
|
* @returns {boolean}
|
|
466
466
|
*/
|
|
467
|
-
set_hint(hint:
|
|
467
|
+
set_hint(hint: DecodeHintTypes, value: string): boolean;
|
|
468
468
|
/**
|
|
469
|
-
* @param {
|
|
469
|
+
* @param {DecodeHintTypes} hint
|
|
470
470
|
* @returns {boolean}
|
|
471
471
|
*/
|
|
472
|
-
remove_hint(hint:
|
|
472
|
+
remove_hint(hint: DecodeHintTypes): boolean;
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
475
475
|
*/
|
|
@@ -479,21 +479,21 @@ export class EncodeHintDictionary {
|
|
|
479
479
|
*/
|
|
480
480
|
constructor();
|
|
481
481
|
/**
|
|
482
|
-
* @param {
|
|
482
|
+
* @param {EncodeHintTypes} hint
|
|
483
483
|
* @returns {string}
|
|
484
484
|
*/
|
|
485
|
-
get_hint(hint:
|
|
485
|
+
get_hint(hint: EncodeHintTypes): string;
|
|
486
486
|
/**
|
|
487
|
-
* @param {
|
|
487
|
+
* @param {EncodeHintTypes} hint
|
|
488
488
|
* @param {string} value
|
|
489
489
|
* @returns {boolean}
|
|
490
490
|
*/
|
|
491
|
-
set_hint(hint:
|
|
491
|
+
set_hint(hint: EncodeHintTypes, value: string): boolean;
|
|
492
492
|
/**
|
|
493
|
-
* @param {
|
|
493
|
+
* @param {EncodeHintTypes} hint
|
|
494
494
|
* @returns {boolean}
|
|
495
495
|
*/
|
|
496
|
-
remove_hint(hint:
|
|
496
|
+
remove_hint(hint: EncodeHintTypes): boolean;
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
499
|
*/
|