mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-28 05:54:19 -04:00
Add Data Matrix Rectangular Extension (DMRE) in regular distribution
- add define "DM_DMRE 101" to zint.h as option_3 value - add option "-dmre" to command line - add ckeckbutton "Activate DMRE in automatic mode" to qzint - make dmatrix.c/dmatrix.h aware of option_3 value DM_DMRE and include DMRE in automatic mode - Use version 2.5 everywere (as already started by Robin) - common test case for DMRE in automatic mode is numeric input data with 48 digits, which should lead to a symbol of size 8x64
This commit is contained in:
parent
0d7ee10ef5
commit
372994d794
13 changed files with 93 additions and 92 deletions
|
@ -429,13 +429,13 @@ static int Encode(Tcl_Interp *interp, int objc,
|
|||
"-bind", "-box", "-barcode", "-height", "-whitesp", "-border",
|
||||
"-fg", "-bg", "-cols", "-vers", "-rotate",
|
||||
"-secure", "-mode", "-primary", "-scale", "-format",
|
||||
"-notext", "-square", "-init", "-smalltext", "-to",
|
||||
"-notext", "-square", "-dmre", "-init", "-smalltext", "-to",
|
||||
NULL};
|
||||
enum iOption {
|
||||
iBind, iBox, iBarcode, iHeight, iWhiteSp, iBorder,
|
||||
iFG, iBG, iCols, iVers, iRotate,
|
||||
iSecure, iMode, iPrimary, iScale, iFormat,
|
||||
iNoText, iSquare, iInit, iSmallText, iTo
|
||||
iNoText, iSquare, iDMRE, iInit, iSmallText, iTo
|
||||
};
|
||||
int optionIndex;
|
||||
int intValue;
|
||||
|
@ -458,6 +458,7 @@ static int Encode(Tcl_Interp *interp, int objc,
|
|||
case iSmallText:
|
||||
case iNoText:
|
||||
case iSquare:
|
||||
case iDMRE:
|
||||
/* >> Binary options */
|
||||
if (TCL_OK != Tcl_GetBooleanFromObj(interp, objv[optionPos+1],
|
||||
&intValue))
|
||||
|
@ -558,6 +559,12 @@ static int Encode(Tcl_Interp *interp, int objc,
|
|||
case iSquare:
|
||||
hSymbol->option_3 = (intValue?DM_SQUARE:0);
|
||||
break;
|
||||
case iDMRE:
|
||||
/* DM_SQUARE overwrites DM_DMRE */
|
||||
if (hSymbol->option_3 != DM_DMRE) {
|
||||
Symbol->option_3 = (intValue?DM_DMRE:0);
|
||||
}
|
||||
break;
|
||||
case iScale:
|
||||
if (doubleValue < 0.01) {
|
||||
Tcl_SetObjResult(interp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue