Pcbnew: DRAWSEGMENT polygonal shape: fix drawings in Legacy mode. Add IsPolygonFilled() to know if the polygon is filled or not.

IsPolygonFilled() replaces the hard coded comparisob with Edge_Cut in code.
For now the polygon is not filled only on Edge_Cut layer.

But in the future, it could be an option for other layers.
This commit is contained in:
jean-pierre charras
2018-12-05 09:57:59 +01:00
parent b8309e2a70
commit 754837f947
4 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -534,7 +534,7 @@ void BRDITEMS_PLOTTER::Plot_1_EdgeModule( EDGE_MODULE* aEdge )
cornerList.push_back( corner );
}
if( m_layerMask[ Edge_Cuts ] )
if( !aEdge->IsPolygonFilled() )
{
for( size_t i = 1; i < cornerList.size(); i++ )
{
@@ -777,7 +777,7 @@ void BRDITEMS_PLOTTER::PlotDrawSegment( DRAWSEGMENT* aSeg )
case S_POLYGON:
{
if( m_layerMask[ Edge_Cuts ] )
if( !aSeg->IsPolygonFilled() )
{
for( auto it = aSeg->GetPolyShape().IterateSegments( 0 ); it; it++ )
{