All: use CPOLYGONS_LIST, a typedef of std::vector<CPolyPt> to handle a Corners Polygons List.

This is a starting point of some code enhancements relative to polygons in Pcbew and 3D viewer.
This commit is contained in:
jean-pierre charras
2013-05-03 19:51:10 +02:00
parent ea990230ca
commit b2a76062c7
25 changed files with 376 additions and 352 deletions
+4 -4
View File
@@ -506,7 +506,7 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
*/
void BRDITEMS_PLOTTER::PlotFilledAreas( ZONE_CONTAINER* aZone )
{
std::vector<CPolyPt> polysList = aZone->GetFilledPolysList();
const CPOLYGONS_LIST& polysList = aZone->GetFilledPolysList();
unsigned imax = polysList.size();
if( imax == 0 ) // Nothing to draw
@@ -526,10 +526,10 @@ void BRDITEMS_PLOTTER::PlotFilledAreas( ZONE_CONTAINER* aZone )
*/
for( unsigned ic = 0; ic < imax; ic++ )
{
CPolyPt* corner = &polysList[ic];
cornerList.push_back( wxPoint( corner->x, corner->y) );
const CPolyPt& corner = polysList[ic];
cornerList.push_back( wxPoint( corner.x, corner.y) );
if( corner->end_contour ) // Plot the current filled area outline
if( corner.end_contour ) // Plot the current filled area outline
{
// First, close the outline
if( cornerList[0] != cornerList[cornerList.size() - 1] )