mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
- API: add new zint_symbol dpmm
field for output resolution (BMP/
EMF/PCX/PNG/TIF only, i.e. excluding EPS, GIF & SVG) - Add support for specifying scale by X-dimension and resolution with new option `--scalexdimdp` for CLI/Tcl & new API function `ZBarcode_Scale_From_XdimDp()` (+ `ZBarcode_XdimDp_From_Scale()` & `ZBarcode_Default_Xdim()`) and new GUI popup; manual: document - BMP/EMF/PCX/PNG/TIF: use new `dpmm` resolution field (for EMF following Inkscape) - backend_qt: add `dpmm()`, `vectorWidth()`, `vectorHeight()`, `noPng()`, `getVersion()`, `takesGS1AIData()`, & `XdimDp` stuff incl. new `QZintXdimDp` struct for passing around scale vars & use in `getAsCLI()`; add comments - Raise `scale` limit to 200 (from 100) to allow for large dpmm - output: create directories & subdirectories as necessary for output path using new function `out_fopen()` and use in BMP/EMF/ EPS/GIF/PCX/PNG/SVG/TIF - DPLEIT/DPIDENT: format HRT according to (incomplete) documentation, and set default height to 72X (from 50X) - CODE128B renamed to CODE128AB as can use subsets A and/or B - CODABAR: fix minimum height calc - EMF: fix indexing of handles (zero-based not 1-based) - GUI: fix symbology zap (previous technique of clearing and re-loading settings without doing a sync no longer works); fix UPCEAN guard descent enable - MAILMARK: better error message if input < 14 characters - GUI: add "Default" button for DAFT tracker ratio & enable/disable various default buttons; use new `takesGS1AIData()` to enable/disable GS1-specific checkboxes - CLI: use new `validate_float()` to parse float options (7 significant digits allowed only, no scientific notation) - DATAMATRIX/GRIDMATRIX/PDF417/QR/ULTRA: micro-optimize structapp ID parse - library/CLI: fiddle with static asserts (make CHAR_BIT sensitive, supposedly) - win32/README: update building libpng (assembly removed) - README.linux: document incompatibility of Qt6 >= 6.3 - manual: expand Barcode Studio waffle - test suite: change range separator to hyphen and allow multiple excludes
This commit is contained in:
@ -111,6 +111,7 @@ extern "C" {
|
||||
int fontsize; /* Unused */
|
||||
int input_mode; /* Encoding of input data (see DATA_MODE etc below). Default DATA_MODE */
|
||||
int eci; /* Extended Channel Interpretation. Default 0 (none) */
|
||||
float dpmm; /* Resolution of output in dots per mm (BMP/EMF/PCX/PNG/TIF only). Default 0 (none) */
|
||||
float dot_size; /* Size of dots used in BARCODE_DOTTY_MODE. Default 0.8 */
|
||||
float guard_descent; /* Height in X-dimensions that EAN/UPC guard bars descend. Default 5 */
|
||||
struct zint_structapp structapp; /* Structured Append info. Default structapp.count 0 (none) */
|
||||
@ -184,7 +185,8 @@ extern "C" {
|
||||
#define BARCODE_PDF417TRUNC 56 /* Legacy */
|
||||
#define BARCODE_MAXICODE 57 /* MaxiCode */
|
||||
#define BARCODE_QRCODE 58 /* QR Code */
|
||||
#define BARCODE_CODE128B 60 /* Code 128 (Subset B) */
|
||||
#define BARCODE_CODE128AB 60 /* Code 128 (Suppress subset C) */
|
||||
#define BARCODE_CODE128B 60 /* Legacy */
|
||||
#define BARCODE_AUSPOST 63 /* Australia Post Standard Customer */
|
||||
#define BARCODE_AUSREPLY 66 /* Australia Post Reply Paid */
|
||||
#define BARCODE_AUSROUTE 67 /* Australia Post Routing */
|
||||
@ -322,7 +324,7 @@ extern "C" {
|
||||
#define ZINT_ERROR_USES_ECI 13 /* Error counterpart of warning if WARN_FAIL_ALL set (see below) */
|
||||
#define ZINT_ERROR_NONCOMPLIANT 14 /* Error counterpart of warning if WARN_FAIL_ALL set */
|
||||
|
||||
/* Warning warn (`symbol->warn_level`) */
|
||||
/* Warning level (`symbol->warn_level`) */
|
||||
#define WARN_DEFAULT 0 /* Default behaviour */
|
||||
#define WARN_FAIL_ALL 2 /* Treat warning as error */
|
||||
|
||||
@ -443,6 +445,19 @@ extern "C" {
|
||||
ZINT_EXTERN unsigned int ZBarcode_Cap(int symbol_id, unsigned int cap_flag);
|
||||
|
||||
|
||||
/* Return default X-dimension in mm for symbology `symbol_id`. Returns 0 on error (invalid `symbol_id`) */
|
||||
ZINT_EXTERN float ZBarcode_Default_Xdim(int symbol_id);
|
||||
|
||||
/* Return the scale to use for `symbol_id` for non-zero X-dimension `x_dim_mm` at `dpmm` dots per mm for
|
||||
`filetype`. If `dpmm` zero defaults to 12. If `filetype` NULL/empty, defaults to "GIF". Returns 0 on error */
|
||||
ZINT_EXTERN float ZBarcode_Scale_From_XdimDp(int symbol_id, float x_dim_mm, float dpmm, const char *filetype);
|
||||
|
||||
/* Reverse of `ZBarcode_Scale_From_XdimDp()` above to estimate the X-dimension or dpmm given non-zero `scale` and
|
||||
non-zero `x_dim_mm_or_dpmm`. Return value bound to dpmm max not X-dimension max. Returns 0 on error */
|
||||
ZINT_EXTERN float ZBarcode_XdimDp_From_Scale(int symbol_id, float scale, float x_dim_mm_or_dpmm,
|
||||
const char *filetype);
|
||||
|
||||
|
||||
/* Whether Zint built without PNG support */
|
||||
ZINT_EXTERN int ZBarcode_NoPng(void);
|
||||
|
||||
|
Reference in New Issue
Block a user