mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-21 11:57:04 +00:00
ERROR_* renamed to ZERROR_*
updated form master
This commit is contained in:
@@ -79,7 +79,7 @@ void QZint::encode()
|
||||
QByteArray pstr=m_primaryMessage.left(99).toAscii();
|
||||
strcpy(m_zintSymbol->primary,pstr.data());
|
||||
int error = ZBarcode_Encode(m_zintSymbol, (unsigned char*)bstr.data(), bstr.length());
|
||||
if (error > WARN_INVALID_OPTION)
|
||||
if (error > ZWARN_INVALID_OPTION)
|
||||
m_lastError=m_zintSymbol->errtxt;
|
||||
|
||||
if (m_zintSymbol->symbology == BARCODE_MAXICODE)
|
||||
@@ -282,10 +282,10 @@ bool QZint::save_to_file(QString filename)
|
||||
strcpy(m_zintSymbol->fgcolour,fgcol.data());
|
||||
strcpy(m_zintSymbol->bgcolour,bgcol.data());
|
||||
int error = ZBarcode_Encode(m_zintSymbol, (unsigned char*)bstr.data(), bstr.length());
|
||||
if (error > WARN_INVALID_OPTION)
|
||||
if (error > ZWARN_INVALID_OPTION)
|
||||
m_lastError=m_zintSymbol->errtxt;
|
||||
error = ZBarcode_Print(m_zintSymbol, 0);
|
||||
if (error > WARN_INVALID_OPTION)
|
||||
if (error > ZWARN_INVALID_OPTION)
|
||||
m_lastError=m_zintSymbol->errtxt;
|
||||
if(error == 0) { return true; } else { return false; }
|
||||
}
|
||||
@@ -526,36 +526,8 @@ void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode
|
||||
if (ed != module_set(row, j))
|
||||
break;
|
||||
QColor color;
|
||||
/* switch(ed)
|
||||
{
|
||||
case 'R':
|
||||
color=qRgb(0xff,0x00,0x00);
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
color=qRgb(0x00,0xff,0x00);
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
color=qRgb(0x00,0x00,0xff);
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
color=qRgb(0x00,0xff,0xff);
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
color=qRgb(0xff,0x00,0xff);
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
color=qRgb(0xff,0xff,0x00);
|
||||
break;
|
||||
|
||||
default: */
|
||||
color=m_fgColor;
|
||||
/* break;
|
||||
} */
|
||||
|
||||
if(!((i > main_width) && (row == m_zintSymbol->rows - 1))) {
|
||||
painter.fillRect(i,y,linewidth,m_zintSymbol->row_height[row],QBrush(color));
|
||||
} else {
|
||||
@@ -664,8 +636,8 @@ void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode
|
||||
}
|
||||
j += block_width;
|
||||
} while (j < 96 + comp_offset);
|
||||
painter.drawText(xoffset - 7, m_zintSymbol->height + yoffset, 7, 7,Qt::AlignCenter, caption.mid(0,1));
|
||||
painter.drawText(96 + xoffset, m_zintSymbol->height + yoffset, 7, 7,Qt::AlignCenter, caption.mid(11,1));
|
||||
painter.drawText(xoffset - 7, m_zintSymbol->height + yoffset + 2, 7, 7,Qt::AlignCenter, caption.mid(0,1));
|
||||
painter.drawText(96 + xoffset, m_zintSymbol->height + yoffset + 2, 7, 7,Qt::AlignCenter, caption.mid(11,1));
|
||||
painter.setFont(fontLarge);
|
||||
painter.drawText(11 + xoffset, m_zintSymbol->height + yoffset, 35, 9,Qt::AlignCenter, caption.mid(1,5));
|
||||
painter.drawText(49 + xoffset, m_zintSymbol->height + yoffset, 35, 9,Qt::AlignCenter, caption.mid(6,5));
|
||||
@@ -682,8 +654,8 @@ void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode
|
||||
painter.fillRect(46 + xoffset,m_zintSymbol->height,1,5,QBrush(m_fgColor));
|
||||
painter.fillRect(48 + xoffset,m_zintSymbol->height,1,5,QBrush(m_fgColor));
|
||||
painter.fillRect(50 + xoffset,m_zintSymbol->height,1,5,QBrush(m_fgColor));
|
||||
painter.drawText(xoffset - 7, m_zintSymbol->height + yoffset, 7, 7,Qt::AlignCenter, caption.mid(0,1));
|
||||
painter.drawText(51 + xoffset, m_zintSymbol->height + yoffset, 7, 7,Qt::AlignCenter, caption.mid(7,1));
|
||||
painter.drawText(xoffset - 7, m_zintSymbol->height + yoffset + 2, 7, 7,Qt::AlignCenter, caption.mid(0,1));
|
||||
painter.drawText(51 + xoffset, m_zintSymbol->height + yoffset + 2, 7, 7,Qt::AlignCenter, caption.mid(7,1));
|
||||
painter.setFont(fontLarge);
|
||||
painter.drawText(3 + xoffset, m_zintSymbol->height + yoffset, 43, 9,Qt::AlignCenter, caption.mid(1,6));
|
||||
if(caption.size() == 11) { /* EAN-2 */ painter.drawText(60 + xoffset, addon_text_height, 20, 9,Qt::AlignCenter, caption.mid(9,2)); };
|
||||
|
||||
Reference in New Issue
Block a user