mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 13:34:19 -04:00
Allow adjustment of dot size when in dotty mode
This commit is contained in:
parent
b13efe334a
commit
9eff5cc63a
10 changed files with 46 additions and 14 deletions
|
@ -41,6 +41,7 @@ namespace Zint {
|
|||
m_scale = 1.0;
|
||||
m_option_3 = 0;
|
||||
m_hidetext = FALSE;
|
||||
m_dot_size = 4.0 / 5.0;
|
||||
}
|
||||
|
||||
QZint::~QZint() {
|
||||
|
@ -62,6 +63,7 @@ namespace Zint {
|
|||
m_zintSymbol->option_1 = m_securityLevel;
|
||||
m_zintSymbol->input_mode = m_input_mode;
|
||||
m_zintSymbol->option_2 = m_width;
|
||||
m_zintSymbol->dot_size = m_dot_size;
|
||||
if (m_hidetext) {
|
||||
m_zintSymbol->show_hrt = 0;
|
||||
} else {
|
||||
|
@ -151,6 +153,10 @@ namespace Zint {
|
|||
void QZint::setScale(float scale) {
|
||||
m_scale = scale;
|
||||
}
|
||||
|
||||
void QZint::setDotSize(float dot_size) {
|
||||
m_dot_size = dot_size;
|
||||
}
|
||||
|
||||
QColor QZint::fgColor() {
|
||||
return m_fgColor;
|
||||
|
@ -239,6 +245,7 @@ namespace Zint {
|
|||
m_zintSymbol->option_1 = m_securityLevel;
|
||||
m_zintSymbol->input_mode = m_input_mode;
|
||||
m_zintSymbol->option_2 = m_width;
|
||||
m_zintSymbol->dot_size = m_dot_size;
|
||||
if (m_hidetext) {
|
||||
m_zintSymbol->show_hrt = 0;
|
||||
} else {
|
||||
|
@ -493,7 +500,7 @@ namespace Zint {
|
|||
for (int c = 0; c < m_zintSymbol->width; c++) {
|
||||
if (module_set(r, c)) {
|
||||
|
||||
painter.drawEllipse(QPointF((c + 1.0), (r + 1.0)), 0.5, 0.5);
|
||||
painter.drawEllipse(QPointF((c + 1.0), (r + 1.0)), m_dot_size / 2.0, m_dot_size / 2.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue