Fix stroking error when printing polygons.

This commit is contained in:
Jeff Young 2021-11-17 01:49:44 +00:00
parent f6263e0129
commit 969bef9a36
1 changed files with 9 additions and 3 deletions

View File

@ -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 // If we stroke in GRFilledArc it will stroke the two radials too, so we have to
// fill and stroke separately // 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 ); GRArc1( nullptr, DC, pt1, pt2, c, penWidth, color );
break; break;
@ -318,11 +318,17 @@ void LIB_SHAPE::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
break; break;
case SHAPE_T::POLY: case SHAPE_T::POLY:
if( penWidth > 0 )
GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor ); GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor );
else
GRPoly( nullptr, DC, ptCount, buffer, true, 0, fillColor, fillColor );
break; break;
case SHAPE_T::BEZIER: case SHAPE_T::BEZIER:
if( penWidth > 0 )
GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor ); GRPoly( nullptr, DC, ptCount, buffer, true, penWidth, color, fillColor );
else
GRPoly( nullptr, DC, ptCount, buffer, true, 0, fillColor, fillColor );
break; break;
default: default: