From cffc99e384c948fd06d96e1e245547afa95b027d Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 20 Jan 2022 10:52:48 -0800 Subject: [PATCH] Don't close filled polylines when printing Eeschema/libedit support open, filled polylines. When printing, this should be drawn as a fill, followed by the polyline to avoid assumptions about closed polygons in the graphic code Fixes https://gitlab.com/kicad/code/kicad/issues/10537 (cherry picked from commit 615eda816ee0839e88bfa3bfbbcdd672f2f3b363) --- eeschema/lib_shape.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eeschema/lib_shape.cpp b/eeschema/lib_shape.cpp index 8769f65f7f..94f10432ea 100644 --- a/eeschema/lib_shape.cpp +++ b/eeschema/lib_shape.cpp @@ -314,10 +314,12 @@ void LIB_SHAPE::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset break; case SHAPE_T::POLY: + + GRPoly( nullptr, DC, ptCount, buffer, true, 0, fillColor, fillColor ); + if( penWidth > 0 ) - GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor ); - else - GRPoly( nullptr, DC, ptCount, buffer, true, 0, fillColor, fillColor ); + GRPoly( nullptr, DC, ptCount, buffer, false, penWidth, color, fillColor ); + break; case SHAPE_T::BEZIER: