Loading common/gr_basic.cpp +13 −15 Original line number Original line Diff line number Diff line Loading @@ -805,15 +805,11 @@ static void GRSPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[], } } else else { { wxPoint endPt = Points[n - 1]; GRMoveTo( Points[0].x, Points[0].y ); for( int i = 1; i < n; ++i ) GRSetBrush( DC, Color ); { DC->DrawLines( n, Points ); GRLineTo( ClipBox, DC, Points[i].x, Points[i].y, width, Color ); } // The last point is not drawn by DrawLine and DrawLines // Add it if the polygon is not closed if( endPt != Points[0] ) DC->DrawPoint( endPt.x, endPt.y ); } } } } Loading Loading @@ -841,16 +837,18 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC, } } else else { { GRSetBrush( aDC, aBgColor ); GRMoveTo( aPoints[0].x, aPoints[0].y ); aDC->DrawLines( aPointCount, aPoints ); for( int i = 1; i < aPointCount; ++i ) { GRLineTo( aClipBox, aDC, aPoints[i].x, aPoints[i].y, aWidth, aColor ); } int lastpt = aPointCount - 1; int lastpt = aPointCount - 1; /* Close the polygon. */ // Close the polygon if( aPoints[lastpt] != aPoints[0] ) if( aPoints[lastpt] != aPoints[0] ) { { GRLine( aClipBox, aDC, aPoints[0].x, aPoints[0].y, GRLineTo( aClipBox, aDC, aPoints[lastpt].x, aPoints[lastpt].y, aWidth, aColor ); aPoints[lastpt].x, aPoints[lastpt].y, aWidth, aColor ); } } } } } } Loading Loading
common/gr_basic.cpp +13 −15 Original line number Original line Diff line number Diff line Loading @@ -805,15 +805,11 @@ static void GRSPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[], } } else else { { wxPoint endPt = Points[n - 1]; GRMoveTo( Points[0].x, Points[0].y ); for( int i = 1; i < n; ++i ) GRSetBrush( DC, Color ); { DC->DrawLines( n, Points ); GRLineTo( ClipBox, DC, Points[i].x, Points[i].y, width, Color ); } // The last point is not drawn by DrawLine and DrawLines // Add it if the polygon is not closed if( endPt != Points[0] ) DC->DrawPoint( endPt.x, endPt.y ); } } } } Loading Loading @@ -841,16 +837,18 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC, } } else else { { GRSetBrush( aDC, aBgColor ); GRMoveTo( aPoints[0].x, aPoints[0].y ); aDC->DrawLines( aPointCount, aPoints ); for( int i = 1; i < aPointCount; ++i ) { GRLineTo( aClipBox, aDC, aPoints[i].x, aPoints[i].y, aWidth, aColor ); } int lastpt = aPointCount - 1; int lastpt = aPointCount - 1; /* Close the polygon. */ // Close the polygon if( aPoints[lastpt] != aPoints[0] ) if( aPoints[lastpt] != aPoints[0] ) { { GRLine( aClipBox, aDC, aPoints[0].x, aPoints[0].y, GRLineTo( aClipBox, aDC, aPoints[lastpt].x, aPoints[lastpt].y, aWidth, aColor ); aPoints[lastpt].x, aPoints[lastpt].y, aWidth, aColor ); } } } } } } Loading