MCPcopy
hub / github.com/zxing-js/library / MultiFormatWriter

Class MultiFormatWriter

src/core/MultiFormatWriter.ts:46–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 * @author dswitkin@google.com (Daniel Switkin)
45 */
46export default class MultiFormatWriter implements Writer {
47
48 /*@Override*/
49 // public encode(contents: string,
50 // format: BarcodeFormat,
51 // width: number /*int*/,
52 // height: number /*int*/): BitMatrix /*throws WriterException */ {
53 // return encode(contents, format, width, height, null)
54 // }
55
56 /*@Override*/
57 public encode(contents: string,
58 format: BarcodeFormat,
59 width: number /*int*/, height: number /*int*/,
60 hints: Map<EncodeHintType, any>): BitMatrix /*throws WriterException */ {
61
62 let writer: Writer;
63 switch (format) {
64 // case BarcodeFormat.EAN_8:
65 // writer = new EAN8Writer()
66 // break
67 // case BarcodeFormat.UPC_E:
68 // writer = new UPCEWriter()
69 // break
70 // case BarcodeFormat.EAN_13:
71 // writer = new EAN13Writer()
72 // break
73 // case BarcodeFormat.UPC_A:
74 // writer = new UPCAWriter()
75 // break
76 case BarcodeFormat.QR_CODE:
77 writer = new QRCodeWriter();
78 break;
79 // case BarcodeFormat.CODE_39:
80 // writer = new Code39Writer()
81 // break
82 // case BarcodeFormat.CODE_93:
83 // writer = new Code93Writer()
84 // break
85 // case BarcodeFormat.CODE_128:
86 // writer = new Code128Writer()
87 // break
88 // case BarcodeFormat.ITF:
89 // writer = new ITFWriter()
90 // break
91 // case BarcodeFormat.PDF_417:
92 // writer = new PDF417Writer()
93 // break
94 // case BarcodeFormat.CODABAR:
95 // writer = new CodaBarWriter()
96 // break
97 // case BarcodeFormat.DATA_MATRIX:
98 // writer = new DataMatrixWriter()
99 // break
100 // case BarcodeFormat.AZTEC:
101 // writer = new AztecWriter()
102 // break
103 default:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected