The base class for all objects which encode/generate a barcode image. @author dswitkin@google.com (Daniel Switkin)
| 26 | * @author dswitkin@google.com (Daniel Switkin) |
| 27 | */ |
| 28 | public interface Writer { |
| 29 | |
| 30 | /** |
| 31 | * Encode a barcode using the default settings. |
| 32 | * |
| 33 | * @param contents The contents to encode in the barcode |
| 34 | * @param format The barcode format to generate |
| 35 | * @param width The preferred width in pixels |
| 36 | * @param height The preferred height in pixels |
| 37 | * @return {@link BitMatrix} representing encoded barcode image |
| 38 | * @throws WriterException if contents cannot be encoded legally in a format |
| 39 | */ |
| 40 | BitMatrix encode(String contents, BarcodeFormat format, int width, int height) |
| 41 | throws WriterException; |
| 42 | |
| 43 | /** |
| 44 | * @param contents The contents to encode in the barcode |
| 45 | * @param format The barcode format to generate |
| 46 | * @param width The preferred width in pixels |
| 47 | * @param height The preferred height in pixels |
| 48 | * @param hints Additional parameters to supply to the encoder |
| 49 | * @return {@link BitMatrix} representing encoded barcode image |
| 50 | * @throws WriterException if contents cannot be encoded legally in a format |
| 51 | */ |
| 52 | BitMatrix encode(String contents, |
| 53 | BarcodeFormat format, |
| 54 | int width, |
| 55 | int height, |
| 56 | Map<EncodeHintType,?> hints) |
| 57 | throws WriterException; |
| 58 | |
| 59 | } |
no outgoing calls
no test coverage detected