mirror of
https://git.code.sf.net/p/zint/code
synced 2026-05-14 18:13:53 +00:00
Allow adjustment of dot size when in dotty mode
This commit is contained in:
@@ -74,6 +74,7 @@ struct zint_symbol *ZBarcode_Create() {
|
||||
symbol->bitmap_width = 0;
|
||||
symbol->bitmap_height = 0;
|
||||
symbol->eci = 3;
|
||||
symbol->dot_size = 4.0 / 5.0;
|
||||
return symbol;
|
||||
}
|
||||
|
||||
@@ -1016,6 +1017,11 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
|
||||
memcpy(local_source, source, length);
|
||||
local_source[length] = '\0';
|
||||
}
|
||||
|
||||
if ((symbol->dot_size < 0.01) || (symbol->dot_size > 20.0)) {
|
||||
strcpy(symbol->errtxt, "Invalid dot size");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
switch (symbol->symbology) {
|
||||
case BARCODE_QRCODE:
|
||||
|
||||
Reference in New Issue
Block a user