From 1007d2b08ecccbbb8f19be672ef45ece26f991cc Mon Sep 17 00:00:00 2001 From: hooper114 Date: Wed, 27 May 2009 08:01:55 +0000 Subject: [PATCH] Transfers colour values to libzint on save --- backend_qt4/qzint.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend_qt4/qzint.cpp b/backend_qt4/qzint.cpp index 208d0f0d..25725984 100644 --- a/backend_qt4/qzint.cpp +++ b/backend_qt4/qzint.cpp @@ -223,6 +223,9 @@ bool QZint::save_to_file(QString filename) { if (m_zintSymbol) ZBarcode_Delete(m_zintSymbol); + + QString fg_colour_hash = m_fgColor.name(); + QString bg_colour_hash = m_bgColor.name(); m_lastError.clear(); m_zintSymbol = ZBarcode_Create(); @@ -241,6 +244,10 @@ bool QZint::save_to_file(QString filename) QByteArray fstr=filename.left(255).toAscii(); strcpy(m_zintSymbol->primary,pstr.data()); strcpy(m_zintSymbol->outfile,fstr.data()); + QByteArray fgcol=fg_colour_hash.right(6).toAscii(); + QByteArray bgcol=bg_colour_hash.right(6).toAscii(); + strcpy(m_zintSymbol->fgcolour,fgcol.data()); + strcpy(m_zintSymbol->bgcolour,bgcol.data()); int error = ZBarcode_Encode_and_Print(m_zintSymbol, (unsigned char*)bstr.data()); if (error > WARN_INVALID_OPTION) m_lastError=m_zintSymbol->errtxt;