SHAPE_LINE_CHAIN: Remove element access
This is the first step to allowing non-segments in the line chain. External routines cannot be allowed to change the line chain without going through the internal routines. To accomplish this, we remove the Vertex() and Point() access routines and only leave the const versions. Transformations are given for both points as well as the chain itself.
This commit is contained in:
@@ -902,7 +902,7 @@ void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS
|
||||
cornerList.reserve( poly.PointCount() + 1 );
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.emplace_back( poly.Point( ii ).x, poly.Point( ii ).y );
|
||||
cornerList.emplace_back( poly.CPoint( ii ).x, poly.CPoint( ii ).y );
|
||||
|
||||
// Close polygon
|
||||
cornerList.push_back( cornerList[0] );
|
||||
@@ -942,7 +942,7 @@ void GERBER_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize
|
||||
cornerList.clear();
|
||||
|
||||
for( int ii = 0; ii < poly.PointCount(); ++ii )
|
||||
cornerList.emplace_back( poly.Point( ii ).x, poly.Point( ii ).y );
|
||||
cornerList.emplace_back( poly.CPoint( ii ).x, poly.CPoint( ii ).y );
|
||||
|
||||
// Close polygon
|
||||
cornerList.push_back( cornerList[0] );
|
||||
|
||||
Reference in New Issue
Block a user