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:
Seth Hillbrand
2019-12-12 13:54:48 +00:00
parent 7d6665c313
commit c4d853c1e8
42 changed files with 280 additions and 358 deletions
+6 -6
View File
@@ -777,12 +777,12 @@ void DXF_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize
// TransformRoundRectToPolygon creates only one convex polygon
SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
MoveTo( wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
MoveTo( wxPoint( poly.CPoint( 0 ).x, poly.CPoint( 0 ).y ) );
for( int ii = 1; ii < poly.PointCount(); ++ii )
LineTo( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
LineTo( wxPoint( poly.CPoint( ii ).x, poly.CPoint( ii ).y ) );
FinishTo( wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
FinishTo( wxPoint( poly.CPoint( 0 ).x, poly.CPoint( 0 ).y ) );
}
void DXF_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
@@ -793,12 +793,12 @@ void DXF_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize,
{
SHAPE_LINE_CHAIN& poly = aPolygons->Outline( cnt );
MoveTo( wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
MoveTo( wxPoint( poly.CPoint( 0 ).x, poly.CPoint( 0 ).y ) );
for( int ii = 1; ii < poly.PointCount(); ++ii )
LineTo( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) );
LineTo( wxPoint( poly.CPoint( ii ).x, poly.CPoint( ii ).y ) );
FinishTo(wxPoint( poly.Point( 0 ).x, poly.Point( 0 ).y ) );
FinishTo( wxPoint( poly.CPoint( 0 ).x, poly.CPoint( 0 ).y ) );
}
}