From afe2bbaca7aa7ed9f91c32536996cc6b0f6d2e8a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Dec 2013 10:00:51 +0100 Subject: [PATCH 1/2] Corrected polygon outline width. --- pcbnew/pcb_painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 692f73f5e7..84fd8ed459 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -771,7 +771,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) // Set up drawing options m_gal->SetFillColor( color ); - m_gal->SetLineWidth( aZone->GetThermalReliefCopperBridge() / 2.0 ); + m_gal->SetLineWidth( aZone->GetMinThickness() ); if( displayMode == PCB_RENDER_SETTINGS::DZ_SHOW_FILLED ) { From b8b96f77a2ef3b9c8fb73b0614b3679ab8dfaed7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Dec 2013 11:25:23 +0100 Subject: [PATCH 2/2] Corrected drawing of zone outlines. --- pcbnew/pcb_painter.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 84fd8ed459..00aca91053 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -756,11 +756,15 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) for( int i = 0; i < outline->GetCornersCount(); ++i ) { corners.push_back( VECTOR2D( outline->GetPos( i ) ) ); + + if( outline->IsEndContour( i ) ) + { + // The last point for closing the polyline + corners.push_back( corners[0] ); + m_gal->DrawPolyline( corners ); + corners.clear(); + } } - // The last point for closing the polyline - corners.push_back( VECTOR2D( outline->GetPos( 0 ) ) ); - m_gal->DrawPolyline( corners ); - corners.clear(); // Draw the filling if( displayMode != PCB_RENDER_SETTINGS::DZ_HIDE_FILLED )