Commit graph

93 commits

Author SHA1 Message Date
gitlost
c0ec67f99e - vector: ensure separators don't overlap with other rectangles so that
they render correctly when have RGBA alpha channel
- GUI: update_preview() after Data Dialog return to ensure preview in sync
- GUI: add automatic info feedback to "Automatic" combo item of size/row/height
  comboboxes
- backend_qt: always call getMaxRectsRightBottom() for render fudge; use
  ZBarcode_Clear() instead of ZBarcode_Delete() after 1st call
- update BWIPP to latest & add some MICROQR tests to exercise optimize change
2022-08-07 22:43:49 +01:00
gitlost
930f458979 backend: define z_alloca() and use for both Unix and Windows;
replace double-slash comments with old-skool slash asterisk ones;
  define uint16_t etc for Windows ourselves and remove ms_stdint.h &
  stdint_msvc.h as no longer used;
  (backend (excepting test suite) now C89 compatible)
LICENSE: move from backend to root and move COPYING to frontend, with
  copies in frontend_qt & backend_qt, so in where it applies;
  add LICENSE section from manual to root README
2022-07-14 16:01:30 +01:00
gitlost
471aed7a69 BC412: add to backend_tcl; add skeleton test
GUI: allow for Qt not parsing #if's in slots (copy_to_clipboard_png())
2022-07-03 23:54:42 +01:00
gitlost
e30e1f9651 RMQR: update to ISO/IEC 23941:2022 - R13x77 numeric cclens change 8 -> 7
QRCODE: use stricter interpretation of ZINT_FULL_MULTIBYTE, excluding
  certain trailing bytes
libzint: fix some confusing error messages introduced by segment stuff
general: new escape chars \U, \d and \o
backend_qt: fudge rendering of border rectangles due to scaling/translation
  rounding errors TODO: better fudge
GUI: foreground/background colours -> text boxes and icon buttons, add swap
  button, independently movable picker (NULL parent), preview colour changes,
  preview Data Window changes, add clear data (del) buttons, add zap button
  and Factory Reset menu option, various other fixes
libzint: remove STATIC_UNLESS_ZINT_TEST, use wrappers
CMake: add find package QtSvg, remove QtXml
manual: split symbology and general specs and sort, move DAFT to 4-state,
  UPC/EAN -> EAN/UPC, DataBar -> GS1 DataBar always, expand MAILMARK info,
  various other fiddlings
man page: options or -> |, expand MSI Plessey check digit options
README.linux: add packages info
license: add SPDX-License-Identifier to touched files
2022-06-09 21:52:02 +01:00
gitlost
ab3cf4f395 eci.c: replace libiconv-adapted code with own implementations so
as to fully comply with BSD license (for why Library GPL 2+ not
  compatible see https://opensource.stackexchange.com/a/6701),
  ~3% slower (maybe), +~6K extra in data
  (gb18030.c, gb2313.c & sjis.c removed, mapping .TXT files moved
  to backend/tools/data & extra ones added, 2 new PHP generators)
GUI: CODE39/EXCODE39: show/hide HIBC check digit option in addition
  to enable/disable (less confusing)
CLI: batch: pedantic check for EOF using intChar in newline fgetc()
  loop
test_args.c: don't use WIFEXITED(), WEXITSTATUS() on Windows
manual: lessen some copy/paste verbiage by referring back, other
  small tweaks/typos
2022-06-02 20:32:25 +01:00
gitlost
71e72d7ecb Bump version to 2.11.0.9 (dev) 2022-05-24 21:52:02 +01:00
gitlost
6ac8c85dbb Update zint version to 2.11.0 2022-05-24 21:08:51 +01:00
gitlost
719613d4c3 GRIDMATRIX: default char set is GB 2312 only, not Latin-1 with GB 2312 alt
HANXIN/QRCODE: use Hanzi/Kanji modes when compatible ECIs given
manual: one true source now manual.pmd from which manual.txt is generated
CLI: man page moved from frontend/zint.1.gz to docs/zint.1.gz, now
  generated from docs/zint.1.pmd
add README.linux to root dir
2022-05-19 10:17:51 +01:00
gitlost
9aae557cdc CLI/Tcl: fix version check (need <= 999 for DAFT permille)
UPNQR: fix required binary mode using mode_preset
UPNQR: allow mask to be manually specified
GUI: use non-native QColorDialog on Unix also; no noEXE for CLI equivalent;
  add shortcuts for copy-to-clipboard and CLI equivalent
CLI: new --version option to print Zint version
2022-05-12 20:35:06 +01:00
gitlost
f58c80e290 Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
  better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
  namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
2022-05-09 19:50:50 +01:00
gitlost
624d40021e ECI: Update ECIs to AIM ITS/04-023:2022, adding UTF-16BE (was USC-2BE),
UTF-16LE, GBK, separate GB18030, UTF-32BE, UTF-32LE
  add examples to tests for DATAMATRIX, HANXIN, QRCODE
HANXIN: Remove alternating filler in function information;
  GB 18030 now ECI 32 (previously used ECI 29);
  fix gate-posts on codeword limits
  use new ZXing-C++ HanXin detector (diagnostics2 branch) for tests
  check against ISO/IEC 20830:2021 (no substantive changes)
backend_tcl: update ECIs; NOTE: changed names "unicode" -> "utf-16be",
  "euc-cn" -> "gb2312"
GRIDMATRIX/HANXIN/QRCODE/RMQR: warn if auto-conversion (i.e. no ECI given)
  occurs to resp. specialized char sets (GB 2312/GB 18030/Shift JIS)
2022-04-10 11:12:18 +01:00
gitlost
389b4e390d FAST_MODE: test_qzint CLI test ([b36fba]) 2021-12-20 16:57:39 +00:00
gitlost
b36fba8ba6 DATAMATRIX: new algorithm for (near-)minimal encoding, props Alex Geller
Add FAST_MODE input_mode flag and --fast CLI/Tcl option that selects older
  faster ISO algorithm (may be used by other symbologies in the future)
  and "Fast Encoding" checkbox to Data Matrix GUI
GUI: adds Zint version numbers to DATAMATRIX sizes.
2021-12-18 16:22:02 +00:00
gitlost
f5f363b22f Add a test that checks the qZint generated barcodes are equal to those
generated by libzint. Whether or not those barcodes are correct should be
validated in the test suite for libzint, for qZint it's good enough to
produce the same printouts that libzint does, which isn't trivial, especially
as some API names have different meanings, such as qZint ```text```
is libzint ```data```. Props Alonso Schaich <alonso@freebsd.org>
2021-11-26 12:20:54 +00:00
gitlost
f943893d6d GUI: data dialog: convert Line Feeds if escaping on input, escape on output
and set Escaped flag; fix tooltip that they're converted to spaces;
  sequence dialog: re-organize to put Create Sequence stuff only in groupbox
  and put Import -> From File and Clear at bottom, similar to data dialog;
  mainwindow: use new Escaped flag from data dialog and set checkbox and
  statusbar message accordingly
2021-11-25 20:24:02 +00:00
gitlost
61763d0cf3 qzint: getAsCLI: allow for setting GS1PARENS/GS1NOCHECK_MOD thru input_mode 2021-11-23 20:27:28 +00:00
gitlost
739a64a6ff GUI: add CLI equivalent dialog (#163); use spinboxes in Sequence dialog
and restrict sequence to max 10,000, add button icons;
   make Export dialog sizable and show every 100 results, add button icon;
   fix saving CHANNEL option, fix Export painting main window (Windows), fix
   guard descent not-resetting
 qzint: add getAsCLI(), warnLevel(), extra isStackable()/isComposite() etc
 Add ZBarcode_BarcodeName()
 manual: doc above, some fixes, tweaks
2021-11-23 19:12:48 +00:00
Schaich
1c31c92fd4 Enable the qt backend test on windows
The ```configuration``` is required by the visual studio generator to determine
whether to use a Debug or a Release setup (or a user customized one). It's
required by whatever uses that generator rather then just the GUI code.

Add instructions for the Visual Studio Project File generator to the README
and enable the test on Windows.
2021-11-23 21:51:31 +09:00
gitlost
e14d9e99d5 Add HEIGHTPERROW_MODE_input mode flag (#204)
backend_qt: add encodedWidth, encodedRows
DBAR_EXPSTK: add max rows option (option_3)
CODE16K/CODE49: add min rows option (option_1)
GUI: HIBC xxx -> HIBC
2021-11-20 11:32:30 +00:00
Schaich
7e3d0f2405 Fix compilation with Qt <= 5.12
The `__has_feature` macro is a clang extension that works like a macro. If
zint is being compiled using a compiler other then clang, `__has_feature`
is not defined. As it is not defined, it cannot be used as a function call
expression. Any environment that doesn't have `__has_feature` should prevent
the preprocessor from "seeing" the invokation of the macro, as invoking
undefined macros is not supported by the C language.

The usual procedure to assure this would be a construction like
  \#if defined(__has_feature)
  \#  if __has_feature(...)
  \#  endif
  \#endif

which, combined with the GCC check we have here, would result in a
3 level nesting of if and elseif expressions .. and that's without
covering microsoft's compiler.

For this purpose, Qt >= 5.13 has been defining the `__has_feature`
macro on non-clang environments, while defining all (clang) features
to not be available. This allows to write feature checks with "less"
nesting, as we have here.

Mimic Qt-5.13's behavior and provide the `__has_feature` macro if
it's not provided otherwise (either by clang or by Qt), allowing the
function-call-like expression to be parsed on those systems.
2021-11-11 15:51:34 +09:00
gitlost
4e72a541f7 PDF417: fix cols/rows calculation to require multiple <= 928 codewords;
add specify rows option (option_3) (#204);
  warn if cols increased from specified (back-incompatible);
  move table definitions from "pdf417.h" to new "pdf417_tabs.h" and
  make INTERNAL_DATA and share with composite.c (saves ~10K);
  prefix routines and tables with "pdf_";
  some small performance improvements through if/elses, pdf_textprocess()
  & pdf_numbprocess() loop simplifications
MICROQR: fix debug access crash on printing non-NUL-terminating binary
DATAMATRIX: fix missing ++ from "[tp]" at C40/TEXT EOD processing of GS1
  (though probably never reached); use "[tp++]" throughout
Add const to static tables missing it and also to some variables
Change "debug" -> "debug_print" throughout
2021-10-30 22:00:31 +01:00
gitlost
72eac41c34 Add compliant height, using ZINT_COMPLIANT_HEIGHT flag for back-compatibility
Rename barcode funcs to same as BARCODE_XXX name
library: barcode funcs array for dispatch, used for ZBarcode_ValidID() also
general: change is_sane() comparison to nonzero from ZINT_ERROR_INVALID_OPTION
MAILMARK: fuller error messages
CODABAR: add option to show check character in HRT
zint.h: use 0xNNNN for OR-able defines
GUI: add guard descent height reset button, add Zint version to window title,
  static get_zint_version() method, use QStringLiteral (QSL shorthand),
  use SIGNAL(toggled()), add errtxt "popup" and status bar, add icons,
  add saveAs shortcut, add main menu, context menus and actions, add help,
  reset_view() -> reset_colours(), add copy to clipboard as EMF/GIF/PNG/TIF,
  lessen triggering of update_preview(), shorten names of getters/setters,
  simplify/shorten some update_preview() logic in switch,
  CODEONE disable structapp for Version S
qzint.cpp: add on_errored signal, add missing getters, add test
2021-10-09 00:13:39 +01:00
gitlost
c0791ad85e Add Structured Append support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, MAXICODE, MICROPDF417, PDF417, QRCODE, ULTRA
DOTCODE: use pre-calculated generator poly coeffs in Reed-Solomon for
  performance improvement
PDF417/MICROPDF417: use common routine pdf417_initial()
GUI: code lines <= 118, shorthand widget_obj(),
  shorten calling upcean_addon_gap(), upcean_guard_descent()
various backend: var name debug -> debug_print
2021-09-28 21:42:44 +01:00
gitlost
4284f3c578 Add output_options BARCODE_QUIET_ZONES and BARCODE_NO_QUIET_ZONES 2021-09-24 13:21:24 +01:00
gitlost
4009c86c5f UPC/EAN: Add guard_bar descent (guard_descent)
zint.h: Adjust field order to improve alignments; encoded_data 143 -> 144
2021-09-22 00:04:15 +01:00
gitlost
492d9a41c5 GUI: remove refs to AspectRatioMode and mark as legacy (#243) 2021-09-05 21:52:00 +01:00
gitlost
b7adbf4e5b vector: Add width to struct zint_vector_circle: fix qzint render 2021-08-23 22:54:27 +01:00
gitlost
3388f98c00 vector: Add width to struct zint_vector_circle & use for MaxiCode bullseye
**Incompatible change**
2021-08-22 13:59:01 +01:00
gitlost
62cc9e49f5 Bump version to 2.10.0.9 (dev) 2021-08-14 16:11:25 +01:00
gitlost
a04a44f1e6 Update zint version to 2.10.0 2021-08-10 16:14:10 +01:00
gitlost
2e84fd5157 Replace WARN_ZPL_COMPAT with GS1NOCHECK_MODE 2021-07-13 17:39:03 +01:00
atom
3e995c70fb Simpily CMakeLists 2021-07-07 12:39:21 +03:00
gitlost
54947fb435 Restore backend_qt - static only now; qzint: legacy support for renamed methods 2021-06-24 18:31:08 +01:00
Robin Stuart
f9b639ed9c Move QZint class into frontend binary 2020-11-22 20:17:46 +00:00
Robin Stuart
3eb31fe3f8 Take version information from CmakeLists.txt
Warning: potential incompatibility because version number is no longer stored in zint.h
2020-11-22 11:29:45 +00:00
gitlost
943ba79866 AZTEC: fix bit-stuffing; AZTECRUNE: fix >= 128; DATAMATRIX: eod shift -> 0 pad; Qt6 2020-10-26 12:21:43 +00:00
gitlost
90012ab23f EANX_CC: allow for check digit + buffer overflow for too long add-on; GUI text colour; cmake 3.0 2020-10-05 23:22:06 +01:00
gitlost
36c19053d7 vector.c: string halign; POSTNET/PLANET: 1 module space; ZBarcode_Cap(); GUI settings 2020-09-30 12:19:12 +01:00
gitlost
ac7b5dd282 #206 build: version to 2.9.1.9; ZINT_VERSION_BUILD (9 dev); tools/update_version.php 2020-09-04 16:38:11 +01:00
Robin Stuart
20f767c4b6 Force white squares (not same as bgcolour) in Ultracode 2020-08-12 12:19:26 +01:00
Robin Stuart
0a6459aed6 Restore link for alpha option from GUI 2020-08-04 15:10:16 +01:00
Harald Oehlmann
b78fa8cf2f - Compile-able with MS-VC6
- Compile-able with MS-VC2015+QT5.18
- transbarency in TCL backend
- correct TCL demo
- README changes
2020-08-04 15:49:25 +02:00
Robin Stuart
fd9aa785ab Make alpha channel available from GUI 2020-08-03 21:08:48 +01:00
gitlost
9db5dd15c2 Windows: #196 Visual Studio 2017 Zint Studio instructions 2020-06-17 20:46:18 +01:00
gitlost
3690c19749 CHANNEL: use nested loops (CHNCHK) and pre-calculated values for performance 2020-06-10 18:41:36 +01:00
gitlost
6242e02638 CODEONE/ULTRA overrun fixes; TELEPEN fixes; CODEONE/LOGMARS/VIN/CODABAR options; GUI updates; tests 2020-06-04 18:45:25 +01:00
gitlost
7be63a00b6 CODE16K fixes; separator default 1; raster/vector.c quiet_zones, output.c; #191 2020-05-21 18:22:28 +01:00
gitlost
8dcd09406c CODABLOCKF and CODE128 fixes; row separator height option_3; #191 2020-05-16 10:22:33 +01:00
Robin Stuart
0d26948baa Merge branch Ultra 2020-04-06 17:05:22 +01:00
Robin Stuart
a63f3af6a4 Add Ultracode to Qt frontend 2020-04-06 16:37:34 +01:00