From b7adbf4e5b846a723304806bc9010d244bbbe565 Mon Sep 17 00:00:00 2001 From: gitlost Date: Mon, 23 Aug 2021 22:54:27 +0100 Subject: [PATCH] vector: Add width to struct zint_vector_circle: fix qzint render --- backend/zint.h | 4 ++-- backend_qt/qzint.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/zint.h b/backend/zint.h index a9435741..13a05ba8 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -67,8 +67,8 @@ extern "C" { struct zint_vector_circle { float x, y; float diameter; /* Circle diameter. Does not include width (if any) */ - float width; /* Width of circle perimeter. 0 for fill (disc) */ - int colour; /* Non-zero for draw with background colour */ + float width; /* Width of circle perimeter (circumference). 0 for fill (disc) */ + int colour; /* Non-zero for draw with background colour (else draw with foreground colour) */ struct zint_vector_circle *next; /* Pointer to next circle */ }; diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp index 06328b7b..b2e3f6c1 100644 --- a/backend_qt/qzint.cpp +++ b/backend_qt/qzint.cpp @@ -574,7 +574,7 @@ namespace Zint { p.setColor(m_fgColor); p.setWidthF(circle->width); painter.setPen(p); - painter.setBrush(circle->width ? Qt::NoBrush : bgBrush); + painter.setBrush(circle->width ? Qt::NoBrush : fgBrush); } painter.drawEllipse(QPointF(circle->x, circle->y), radius, radius); circle = circle->next;