From 969bef9a36ec9e2eab0b34fda71c0617a83c24d8 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 17 Nov 2021 01:49:44 +0000 Subject: [PATCH] Fix stroking error when printing polygons. --- eeschema/lib_shape.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eeschema/lib_shape.cpp b/eeschema/lib_shape.cpp index df0eb2f55f..88219d7ed9 100644 --- a/eeschema/lib_shape.cpp +++ b/eeschema/lib_shape.cpp @@ -304,7 +304,7 @@ void LIB_SHAPE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, // If we stroke in GRFilledArc it will stroke the two radials too, so we have to // fill and stroke separately - GRFilledArc1( nullptr, DC, pt1, pt2, c, penWidth, fillColor, fillColor ); + GRFilledArc1( nullptr, DC, pt1, pt2, c, 0, fillColor, fillColor ); GRArc1( nullptr, DC, pt1, pt2, c, penWidth, color ); break; @@ -318,11 +318,17 @@ void LIB_SHAPE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, break; case SHAPE_T::POLY: - GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor ); + if( penWidth > 0 ) + GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor ); + else + GRPoly( nullptr, DC, ptCount, buffer, true, 0, fillColor, fillColor ); break; case SHAPE_T::BEZIER: - GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor ); + if( penWidth > 0 ) + GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor ); + else + GRPoly( nullptr, DC, ptCount, buffer, true, 0, fillColor, fillColor ); break; default: