vector: Add width to struct zint_vector_circle: fix qzint render

This commit is contained in:
gitlost 2021-08-23 22:54:27 +01:00
parent 3388f98c00
commit b7adbf4e5b
2 changed files with 3 additions and 3 deletions

View File

@ -67,8 +67,8 @@ extern "C" {
struct zint_vector_circle { struct zint_vector_circle {
float x, y; float x, y;
float diameter; /* Circle diameter. Does not include width (if any) */ float diameter; /* Circle diameter. Does not include width (if any) */
float width; /* Width of circle perimeter. 0 for fill (disc) */ float width; /* Width of circle perimeter (circumference). 0 for fill (disc) */
int colour; /* Non-zero for draw with background colour */ int colour; /* Non-zero for draw with background colour (else draw with foreground colour) */
struct zint_vector_circle *next; /* Pointer to next circle */ struct zint_vector_circle *next; /* Pointer to next circle */
}; };

View File

@ -574,7 +574,7 @@ namespace Zint {
p.setColor(m_fgColor); p.setColor(m_fgColor);
p.setWidthF(circle->width); p.setWidthF(circle->width);
painter.setPen(p); 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); painter.drawEllipse(QPointF(circle->x, circle->y), radius, radius);
circle = circle->next; circle = circle->next;