1 /* zint.h - definitions for libzint 2 3 libzint - the open source barcode library 4 Copyright (C) 2009-2021 Robin Stuart <rstuart114@gmail.com> 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions 8 are met: 9 10 1. Redistributions of source code must retain the above copyright 11 notice, this list of conditions and the following disclaimer. 12 2. Redistributions in binary form must reproduce the above copyright 13 notice, this list of conditions and the following disclaimer in the 14 documentation and/or other materials provided with the distribution. 15 3. Neither the name of the project nor the names of its contributors 16 may be used to endorse or promote products derived from this software 17 without specific prior written permission. 18 19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 SUCH DAMAGE. 30 */ 31 /* vim: set ts=4 sw=4 et : */ 32 /* 33 * For version, see "zintconfig.h" 34 * For documentation, see "../docs/manual.txt" 35 */ 36 37 #ifndef ZINT_H 38 #define ZINT_H 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif /* __cplusplus */ 43 44 struct zint_vector_rect { 45 float x, y, height, width; 46 int colour; /* -1 for foreground, 1-8 for Cyan, Blue, Magenta, Red, Yellow, Green, Black, White */ 47 struct zint_vector_rect *next; /* Pointer to next rectangle */ 48 }; 49 50 struct zint_vector_hexagon { 51 float x, y, diameter; 52 int rotation; /* 0, 90, 180, 270 degrees */ 53 struct zint_vector_hexagon *next; /* Pointer to next hexagon */ 54 }; 55 56 struct zint_vector_string { 57 float x, y, fsize; /* x, y position relative to halign; font size */ 58 float width; /* Suggested string width, may be 0 if none recommended */ 59 int length; /* Number of characters */ 60 int rotation; /* 0, 90, 180, 270 degrees */ 61 int halign; /* Horizontal alignment: 0 for centre, 1 for left, 2 for right (end) */ 62 unsigned char *text; 63 struct zint_vector_string *next; /* Pointer to next string */ 64 }; 65 66 struct zint_vector_circle { 67 float x, y, diameter; 68 int colour; /* Non-zero for draw with background colour */ 69 struct zint_vector_circle *next; /* Pointer to next circle */ 70 }; 71 72 /* Vector header */ 73 struct zint_vector { 74 float width, height; /* Width, height of barcode image (including text, whitespace) */ 75 struct zint_vector_rect *rectangles; /* Pointer to first rectangle */ 76 struct zint_vector_hexagon *hexagons; /* Pointer to first hexagon */ 77 struct zint_vector_string *strings; /* Pointer to first string */ 78 struct zint_vector_circle *circles; /* Pointer to first circle */ 79 }; 80 81 /* Main symbol structure */ 82 struct zint_symbol { 83 int symbology; /* Symbol to use (see BARCODE_XXX below) */ 84 float height; /* Height in X-dimensions (ignored for fixed-width barcodes) */ 85 int whitespace_width; /* Width in X-dimensions of whitespace to left & right of barcode */ 86 int whitespace_height; /* Height in X-dimensions of whitespace above & below the barcode */ 87 int border_width; /* Size of border in X-dimensions */ 88 int output_options; /* Various output parameters (bind, box etc, see below) */ 89 char fgcolour[10]; /* Foreground as RGB/RGBA hexadecimal string, 6 or 8 characters, NUL-terminated */ 90 char bgcolour[10]; /* Background as RGB/RGBA hexadecimal string, 6 or 8 characters, NUL-terminated */ 91 char *fgcolor; /* Pointer to fgcolour (alternate spelling) */ 92 char *bgcolor; /* Pointer to bgcolour (alternate spelling) */ 93 char outfile[256]; /* Name of file to output to, NUL-terminated. Default "out.png" ("out.gif" if NO_PNG) */ 94 float scale; /* Scale factor when printing barcode */ 95 int option_1; /* Symbol-specific options (see "../docs/manual.txt") */ 96 int option_2; /* Symbol-specific options */ 97 int option_3; /* Symbol-specific options */ 98 int show_hrt; /* Show (1) or hide (0) Human Readable Text. Default 1 */ 99 int fontsize; /* Unused */ 100 int input_mode; /* Encoding of input data (see DATA_MODE etc below). Default DATA_MODE */ 101 int eci; /* Extended Channel Interpretation. Default 0 (none) */ 102 unsigned char text[128]; /* Human Readable Text (if any), UTF-8, NUL-terminated (output only) */ 103 int rows; /* Number of rows used by the symbol (output only) */ 104 int width; /* Width of the generated symbol (output only) */ 105 char primary[128]; /* Primary message data (MaxiCode, Composite), NUL-terminated */ 106 unsigned char encoded_data[200][143]; /* Encoded data (output only). Allows for rows of 1144 modules */ 107 float row_height[200]; /* Heights of rows (output only). Allows for 200 row DotCode */ 108 char errtxt[100]; /* Error message if an error or warning occurs, NUL-terminated (output only) */ 109 unsigned char *bitmap; /* Stored bitmap image (raster output only) */ 110 int bitmap_width; /* Width of bitmap image (raster output only) */ 111 int bitmap_height; /* Height of bitmap image (raster output only) */ 112 unsigned char *alphamap; /* Array of alpha values used (raster output only) */ 113 unsigned int bitmap_byte_length; /* Size of BMP bitmap data (raster output only) */ 114 float dot_size; /* Size of dots used in BARCODE_DOTTY_MODE */ 115 struct zint_vector *vector; /* Pointer to vector header (vector output only) */ 116 int debug; /* Debugging flags */ 117 int warn_level; /* Affects error/warning value returned by Zint API (see WARN_XXX below) */ 118 }; 119 120 /* Symbologies (`symbol->symbology`) */ 121 /* Tbarcode 7 codes */ 122 #define BARCODE_CODE11 1 /* Code 11 */ 123 #define BARCODE_C25STANDARD 2 /* 2 of 5 Standard (Matrix) */ 124 #define BARCODE_C25MATRIX 2 /* Legacy */ 125 #define BARCODE_C25INTER 3 /* 2 of 5 Interleaved */ 126 #define BARCODE_C25IATA 4 /* 2 of 5 IATA */ 127 #define BARCODE_C25LOGIC 6 /* 2 of 5 Data Logic */ 128 #define BARCODE_C25IND 7 /* 2 of 5 Industrial */ 129 #define BARCODE_CODE39 8 /* Code 39 */ 130 #define BARCODE_EXCODE39 9 /* Extended Code 39 */ 131 #define BARCODE_EANX 13 /* EAN (European Article Number) */ 132 #define BARCODE_EANX_CHK 14 /* EAN + Check Digit */ 133 #define BARCODE_GS1_128 16 /* GS1-128 */ 134 #define BARCODE_EAN128 16 /* Legacy */ 135 #define BARCODE_CODABAR 18 /* Codabar */ 136 #define BARCODE_CODE128 20 /* Code 128 */ 137 #define BARCODE_DPLEIT 21 /* Deutsche Post Leitcode */ 138 #define BARCODE_DPIDENT 22 /* Deutsche Post Identcode */ 139 #define BARCODE_CODE16K 23 /* Code 16k */ 140 #define BARCODE_CODE49 24 /* Code 49 */ 141 #define BARCODE_CODE93 25 /* Code 93 */ 142 #define BARCODE_FLAT 28 /* Flattermarken */ 143 #define BARCODE_DBAR_OMN 29 /* GS1 DataBar Omnidirectional */ 144 #define BARCODE_RSS14 29 /* Legacy */ 145 #define BARCODE_DBAR_LTD 30 /* GS1 DataBar Limited */ 146 #define BARCODE_RSS_LTD 30 /* Legacy */ 147 #define BARCODE_DBAR_EXP 31 /* GS1 DataBar Expanded */ 148 #define BARCODE_RSS_EXP 31 /* Legacy */ 149 #define BARCODE_TELEPEN 32 /* Telepen Alpha */ 150 #define BARCODE_UPCA 34 /* UPC-A */ 151 #define BARCODE_UPCA_CHK 35 /* UPC-A + Check Digit */ 152 #define BARCODE_UPCE 37 /* UPC-E */ 153 #define BARCODE_UPCE_CHK 38 /* UPC-E + Check Digit */ 154 #define BARCODE_POSTNET 40 /* USPS POSTNET */ 155 #define BARCODE_MSI_PLESSEY 47 /* MSI Plessey */ 156 #define BARCODE_FIM 49 /* Facing Identification Mark */ 157 #define BARCODE_LOGMARS 50 /* LOGMARS */ 158 #define BARCODE_PHARMA 51 /* Pharmacode One-Track */ 159 #define BARCODE_PZN 52 /* Pharmazentralnummer */ 160 #define BARCODE_PHARMA_TWO 53 /* Pharmacode Two-Track */ 161 #define BARCODE_PDF417 55 /* PDF417 */ 162 #define BARCODE_PDF417COMP 56 /* Compact PDF417 (Truncated PDF417) */ 163 #define BARCODE_PDF417TRUNC 56 /* Legacy */ 164 #define BARCODE_MAXICODE 57 /* MaxiCode */ 165 #define BARCODE_QRCODE 58 /* QR Code */ 166 #define BARCODE_CODE128B 60 /* Code 128 (Subset B) */ 167 #define BARCODE_AUSPOST 63 /* Australia Post Standard Customer */ 168 #define BARCODE_AUSREPLY 66 /* Australia Post Reply Paid */ 169 #define BARCODE_AUSROUTE 67 /* Australia Post Routing */ 170 #define BARCODE_AUSREDIRECT 68 /* Australia Post Redirection */ 171 #define BARCODE_ISBNX 69 /* ISBN */ 172 #define BARCODE_RM4SCC 70 /* Royal Mail 4 State */ 173 #define BARCODE_DATAMATRIX 71 /* Data Matrix (ECC200) */ 174 #define BARCODE_EAN14 72 /* EAN-14 */ 175 #define BARCODE_VIN 73 /* Vehicle Identification Number */ 176 #define BARCODE_CODABLOCKF 74 /* Codablock-F */ 177 #define BARCODE_NVE18 75 /* NVE-18 (SSCC-18) */ 178 #define BARCODE_JAPANPOST 76 /* Japanese Postal Code */ 179 #define BARCODE_KOREAPOST 77 /* Korea Post */ 180 #define BARCODE_DBAR_STK 79 /* GS1 DataBar Stacked */ 181 #define BARCODE_RSS14STACK 79 /* Legacy */ 182 #define BARCODE_DBAR_OMNSTK 80 /* GS1 DataBar Stacked Omnidirectional */ 183 #define BARCODE_RSS14STACK_OMNI 80 /* Legacy */ 184 #define BARCODE_DBAR_EXPSTK 81 /* GS1 DataBar Expanded Stacked */ 185 #define BARCODE_RSS_EXPSTACK 81 /* Legacy */ 186 #define BARCODE_PLANET 82 /* USPS PLANET */ 187 #define BARCODE_MICROPDF417 84 /* MicroPDF417 */ 188 #define BARCODE_USPS_IMAIL 85 /* USPS Intelligent Mail (OneCode) */ 189 #define BARCODE_ONECODE 85 /* Legacy */ 190 #define BARCODE_PLESSEY 86 /* Plessey Code */ 191 192 /* Tbarcode 8 codes */ 193 #define BARCODE_TELEPEN_NUM 87 /* Telepen Numeric */ 194 #define BARCODE_ITF14 89 /* ITF-14 */ 195 #define BARCODE_KIX 90 /* Dutch Post KIX Code */ 196 #define BARCODE_AZTEC 92 /* Aztec Code */ 197 #define BARCODE_DAFT 93 /* DAFT Code */ 198 #define BARCODE_DPD 96 /* DPD Code */ 199 #define BARCODE_MICROQR 97 /* Micro QR Code */ 200 201 /* Tbarcode 9 codes */ 202 #define BARCODE_HIBC_128 98 /* HIBC Code 128 */ 203 #define BARCODE_HIBC_39 99 /* HIBC Code 39 */ 204 #define BARCODE_HIBC_DM 102 /* HIBC Data Matrix */ 205 #define BARCODE_HIBC_QR 104 /* HIBC QR Code */ 206 #define BARCODE_HIBC_PDF 106 /* HIBC PDF417 */ 207 #define BARCODE_HIBC_MICPDF 108 /* HIBC MicroPDF417 */ 208 #define BARCODE_HIBC_BLOCKF 110 /* HIBC Codablock-F */ 209 #define BARCODE_HIBC_AZTEC 112 /* HIBC Aztec Code */ 210 211 /* Tbarcode 10 codes */ 212 #define BARCODE_DOTCODE 115 /* DotCode */ 213 #define BARCODE_HANXIN 116 /* Han Xin (Chinese Sensible) Code */ 214 215 /* Tbarcode 11 codes */ 216 #define BARCODE_MAILMARK 121 /* Royal Mail 4-state Mailmark */ 217 218 /* Zint specific */ 219 #define BARCODE_AZRUNE 128 /* Aztec Runes */ 220 #define BARCODE_CODE32 129 /* Code 32 */ 221 #define BARCODE_EANX_CC 130 /* EAN Composite */ 222 #define BARCODE_GS1_128_CC 131 /* GS1-128 Composite */ 223 #define BARCODE_EAN128_CC 131 /* Legacy */ 224 #define BARCODE_DBAR_OMN_CC 132 /* GS1 DataBar Omnidirectional Composite */ 225 #define BARCODE_RSS14_CC 132 /* Legacy */ 226 #define BARCODE_DBAR_LTD_CC 133 /* GS1 DataBar Limited Composite */ 227 #define BARCODE_RSS_LTD_CC 133 /* Legacy */ 228 #define BARCODE_DBAR_EXP_CC 134 /* GS1 DataBar Expanded Composite */ 229 #define BARCODE_RSS_EXP_CC 134 /* Legacy */ 230 #define BARCODE_UPCA_CC 135 /* UPC-A Composite */ 231 #define BARCODE_UPCE_CC 136 /* UPC-E Composite */ 232 #define BARCODE_DBAR_STK_CC 137 /* GS1 DataBar Stacked Composite */ 233 #define BARCODE_RSS14STACK_CC 137 /* Legacy */ 234 #define BARCODE_DBAR_OMNSTK_CC 138 /* GS1 DataBar Stacked Omnidirectional Composite */ 235 #define BARCODE_RSS14_OMNI_CC 138 /* Legacy */ 236 #define BARCODE_DBAR_EXPSTK_CC 139 /* GS1 DataBar Expanded Stacked Composite */ 237 #define BARCODE_RSS_EXPSTACK_CC 139 /* Legacy */ 238 #define BARCODE_CHANNEL 140 /* Channel Code */ 239 #define BARCODE_CODEONE 141 /* Code One */ 240 #define BARCODE_GRIDMATRIX 142 /* Grid Matrix */ 241 #define BARCODE_UPNQR 143 /* UPNQR (Univerzalnega Plačilnega Naloga QR) */ 242 #define BARCODE_ULTRA 144 /* Ultracode */ 243 #define BARCODE_RMQR 145 /* Rectangular Micro QR Code (rMQR) */ 244 245 /* Output options (`symbol->output_options`) */ 246 #define BARCODE_NO_ASCII 1 /* Legacy (no-op) */ 247 #define BARCODE_BIND 2 /* Boundary bars above & below the symbol and between stacked symbols */ 248 #define BARCODE_BOX 4 /* Box around symbol */ 249 #define BARCODE_STDOUT 8 /* Output to stdout */ 250 #define READER_INIT 16 /* Reader Initialisation (Programming) */ 251 #define SMALL_TEXT 32 /* Use smaller font */ 252 #define BOLD_TEXT 64 /* Use bold font */ 253 #define CMYK_COLOUR 128 /* CMYK colour space (Encapsulated PostScript and TIF) */ 254 #define BARCODE_DOTTY_MODE 256 /* Plot a matrix symbol using dots rather than squares */ 255 #define GS1_GS_SEPARATOR 512 /* Use GS instead of FNC1 as GS1 separator (Data Matrix) */ 256 #define OUT_BUFFER_INTERMEDIATE 1024 /* Return ASCII values in bitmap buffer (OUT_BUFFER only) */ 257 258 /* Input data types (`symbol->input_mode`) */ 259 #define DATA_MODE 0 /* Binary */ 260 #define UNICODE_MODE 1 /* UTF-8 */ 261 #define GS1_MODE 2 /* GS1 */ 262 /* The following may be OR-ed with above */ 263 #define ESCAPE_MODE 8 /* Process escape sequences */ 264 #define GS1PARENS_MODE 16 /* Process parentheses as GS1 AI delimiters (instead of square brackets) */ 265 #define GS1NOCHECK_MODE 32 /* Do not check validity of GS1 data (except that printable ASCII only) */ 266 267 /* Data Matrix specific options (`symbol->option_3`) */ 268 #define DM_SQUARE 100 /* Only consider square versions on automatic symbol size selection */ 269 #define DM_DMRE 101 /* Consider DMRE versions on automatic symbol size selection */ 270 271 /* QR, Han Xin, Grid Matrix specific options (`symbol->option_3`) */ 272 #define ZINT_FULL_MULTIBYTE 200 /* Enable Kanji/Hanzi compression for Latin-1 & binary data */ 273 274 /* Ultracode specific option (`symbol->option_3`) */ 275 #define ULTRA_COMPRESSION 128 /* Enable Ultracode compression (experimental) */ 276 277 /* Warning and error conditions (API return values) */ 278 #define ZINT_WARN_INVALID_OPTION 2 /* Invalid option given but overridden by Zint */ 279 #define ZINT_WARN_USES_ECI 3 /* Automatic ECI inserted by Zint */ 280 #define ZINT_WARN_NONCOMPLIANT 4 /* Symbol created not compliant with standards */ 281 #define ZINT_ERROR 5 /* Warn/error marker, not returned */ 282 #define ZINT_ERROR_TOO_LONG 5 /* Input data wrong length */ 283 #define ZINT_ERROR_INVALID_DATA 6 /* Input data incorrect */ 284 #define ZINT_ERROR_INVALID_CHECK 7 /* Input check digit incorrect */ 285 #define ZINT_ERROR_INVALID_OPTION 8 /* Incorrect option given */ 286 #define ZINT_ERROR_ENCODING_PROBLEM 9 /* Internal error (should not happen) */ 287 #define ZINT_ERROR_FILE_ACCESS 10 /* Error opening output file */ 288 #define ZINT_ERROR_MEMORY 11 /* Memory allocation (malloc) failure */ 289 #define ZINT_ERROR_FILE_WRITE 12 /* Error writing to output file */ 290 #define ZINT_ERROR_USES_ECI 13 /* Error counterpart of warning if WARN_FAIL_ALL set (see below) */ 291 #define ZINT_ERROR_NONCOMPLIANT 14 /* Error counterpart of warning if WARN_FAIL_ALL set */ 292 293 /* Warning warn (`symbol->warn_level`) */ 294 #define WARN_DEFAULT 0 /* Default behaviour */ 295 #define WARN_FAIL_ALL 2 /* Treat warning as error */ 296 297 /* Capability flags (ZBarcode_Cap() `cap_flag`) */ 298 #define ZINT_CAP_HRT 0x0001 /* Prints Human Readable Text? */ 299 #define ZINT_CAP_STACKABLE 0x0002 /* Is stackable? */ 300 #define ZINT_CAP_EXTENDABLE 0x0004 /* Is extendable with add-on data? (Is UPC/EAN?) */ 301 #define ZINT_CAP_COMPOSITE 0x0008 /* Can have composite data? */ 302 #define ZINT_CAP_ECI 0x0010 /* Supports Extended Channel Interpretations? */ 303 #define ZINT_CAP_GS1 0x0020 /* Supports GS1 data? */ 304 #define ZINT_CAP_DOTTY 0x0040 /* Can be output as dots? */ 305 #define ZINT_CAP_FIXED_RATIO 0x0100 /* Has fixed width-to-height (aspect) ratio? */ 306 #define ZINT_CAP_READER_INIT 0x0200 /* Supports Reader Initialisation? */ 307 #define ZINT_CAP_FULL_MULTIBYTE 0x0400 /* Supports full-multibyte option? */ 308 #define ZINT_CAP_MASK 0x0800 /* Is mask selectable? */ 309 310 /* The largest amount of data that can be encoded is 4350 4-byte UTF-8 chars in Han Xin Code */ 311 #define ZINT_MAX_DATA_LEN 17400 312 313 /* Debug flags (debug) */ 314 #define ZINT_DEBUG_PRINT 1 /* Print debug info (if any) to stdout */ 315 #define ZINT_DEBUG_TEST 2 /* For internal test use only */ 316 317 #ifdef _WIN32 318 # if defined(DLL_EXPORT) || defined(PIC) || defined(_USRDLL) 319 # define ZINT_EXTERN __declspec(dllexport) 320 # elif defined(ZINT_DLL) 321 # define ZINT_EXTERN __declspec(dllimport) 322 # else 323 # define ZINT_EXTERN extern 324 # endif 325 #else 326 # define ZINT_EXTERN extern 327 #endif 328 329 /* Create and initialize a symbol structure */ 330 ZINT_EXTERN struct zint_symbol *ZBarcode_Create(void); 331 332 /* Free any output buffers that may have been created and initialize output fields */ 333 ZINT_EXTERN void ZBarcode_Clear(struct zint_symbol *symbol); 334 335 /* Free a symbol structure, including any output buffers */ 336 ZINT_EXTERN void ZBarcode_Delete(struct zint_symbol *symbol); 337 338 339 /* Encode a barcode. If `length` is 0, `source` must be NUL-terminated. */ 340 ZINT_EXTERN int ZBarcode_Encode(struct zint_symbol *symbol, const unsigned char *source, int length); 341 342 /* Encode a barcode using input data from file `filename` */ 343 ZINT_EXTERN int ZBarcode_Encode_File(struct zint_symbol *symbol, const char *filename); 344 345 /* Output a previously encoded symbol to file `symbol->outfile` */ 346 ZINT_EXTERN int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle); 347 348 349 /* Encode and output a symbol to file `symbol->outfile` */ 350 ZINT_EXTERN int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, const unsigned char *source, int length, 351 int rotate_angle); 352 353 /* Encode a symbol using input data from file `filename` and output to file `symbol->outfile` */ 354 ZINT_EXTERN int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, const char *filename, 355 int rotate_angle); 356 357 358 /* Output a previously encoded symbol to memory as raster (`symbol->bitmap`) */ 359 ZINT_EXTERN int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle); 360 361 /* Encode and output a symbol to memory as raster (`symbol->bitmap`) */ 362 ZINT_EXTERN int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, const unsigned char *source, int length, 363 int rotate_angle); 364 365 /* Encode a symbol using input data from file `filename` and output to memory as raster (`symbol->bitmap`) */ 366 ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, const char *filename, 367 int rotate_angle); 368 369 370 /* Output a previously encoded symbol to memory as vector (`symbol->vector`) */ 371 ZINT_EXTERN int ZBarcode_Buffer_Vector(struct zint_symbol *symbol, int rotate_angle); 372 373 /* Encode and output a symbol to memory as vector (`symbol->vector`) */ 374 ZINT_EXTERN int ZBarcode_Encode_and_Buffer_Vector(struct zint_symbol *symbol, const unsigned char *source, 375 int length, int rotate_angle); 376 377 /* Encode a symbol using input data from file `filename` and output to memory as vector (`symbol->vector`) */ 378 ZINT_EXTERN int ZBarcode_Encode_File_and_Buffer_Vector(struct zint_symbol *symbol, const char *filename, 379 int rotate_angle); 380 381 382 /* Is `symbol_id` a recognized symbology? */ 383 ZINT_EXTERN int ZBarcode_ValidID(int symbol_id); 384 385 /* Return the capability flags for symbology `symbol_id` that match `cap_flag` */ 386 ZINT_EXTERN unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag); 387 388 /* Return the version of Zint linked to */ 389 ZINT_EXTERN int ZBarcode_Version(); 390 391 #ifdef __cplusplus 392 } 393 #endif /* __cplusplus */ 394 395 #endif /* ZINT_H */ 396