* The base class for all objects which encode/generate a barcode image. * * @author dswitkin@google.com (Daniel Switkin)
| 30 | * @author dswitkin@google.com (Daniel Switkin) |
| 31 | */ |
| 32 | interface 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 | } |
no outgoing calls
no test coverage detected