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

Interface Writer

src/core/Writer.ts:32–63  ·  view source on GitHub ↗

* The base class for all objects which encode/generate a barcode image. * * @author dswitkin@google.com (Daniel Switkin)

Source from the content-addressed store, hash-verified

30 * @author dswitkin@google.com (Daniel Switkin)
31 */
32interface Writer {
33
34 /**
35 * Encode a barcode using the default settings.
36 *
37 * @param contents The contents to encode in the barcode
38 * @param format The barcode format to generate
39 * @param width The preferred width in pixels
40 * @param height The preferred height in pixels
41 * @return {@link BitMatrix} representing encoded barcode image
42 * @throws WriterException if contents cannot be encoded legally in a format
43 */
44 // encode(contents: string, format: BarcodeFormat, width: number /*int*/, height: number /*int*/): BitMatrix
45
46 /**
47 * @param contents The contents to encode in the barcode
48 * @param format The barcode format to generate
49 * @param width The preferred width in pixels
50 * @param height The preferred height in pixels
51 * @param hints Additional parameters to supply to the encoder
52 * @return {@link BitMatrix} representing encoded barcode image
53 * @throws WriterException if contents cannot be encoded legally in a format
54 */
55 encode(
56 contents: string,
57 format: BarcodeFormat,
58 width: number /*int*/,
59 height: number /*int*/,
60 hints: Map<EncodeHintType, any>
61 ): BitMatrix;
62
63}

Callers 8

writeFunction · 0.65
encodeFunction · 0.65
writeMethod · 0.65
encodeMethod · 0.65
Encoder.spec.tsFile · 0.65

Implementers 15

MultiFormatWritersrc/core/MultiFormatWriter.ts
DataMatrixWritersrc/core/datamatrix/DataMatrixWriter.t
QRCodeWritersrc/core/qrcode/QRCodeWriter.ts
AztecWritersrc/core/aztec/AztecWriter.ts
C40Encodersrc/core/datamatrix/encoder/C40Encoder
MinimalEncodersrc/core/datamatrix/encoder/MinimalEnc
ASCIIEncodersrc/core/datamatrix/encoder/ASCIIEncod
EdifactEncodersrc/core/datamatrix/encoder/EdifactEnc
Base256Encodersrc/core/datamatrix/encoder/Base256Enc
X12Encodersrc/core/datamatrix/encoder/X12Encoder
ECIEncoderSetsrc/core/common/ECIEncoderSet.ts
ReedSolomonEncodersrc/core/common/reedsolomon/ReedSolomo

Calls

no outgoing calls

Tested by

no test coverage detected