Fix some formatting issues.

This commit is contained in:
Jeff Young 2018-12-12 20:10:48 +00:00
parent ed28b7e29b
commit c437ca1640
2 changed files with 23 additions and 18 deletions

View File

@ -70,7 +70,9 @@ CPolyLine::~CPolyLine()
UnHatch(); UnHatch();
} }
/* Removes corners which create a null segment edge
/*
* Removes corners which create a null segment edge
* (i.e. when 2 successive corners are at the same location) * (i.e. when 2 successive corners are at the same location)
* returns the count of removed corners. * returns the count of removed corners.
*/ */
@ -169,6 +171,7 @@ int CPolyLine::NormalizeAreaOutlines( std::vector<CPolyLine*>* aNewPolygonList )
return polySet.OutlineCount(); return polySet.OutlineCount();
} }
/** /**
* Function ImportSettings * Function ImportSettings
* Copy settings (layer, hatch styles) from aPoly * Copy settings (layer, hatch styles) from aPoly
@ -180,6 +183,7 @@ void CPolyLine::ImportSettings( const CPolyLine * aPoly )
SetHatchPitch( aPoly->GetHatchPitch() ); SetHatchPitch( aPoly->GetHatchPitch() );
} }
/* initialize a contour /* initialize a contour
* set layer, hatch style, and starting point * set layer, hatch style, and starting point
*/ */
@ -206,6 +210,7 @@ void CPolyLine::AppendCorner( int x, int y )
m_CornersList.Append( poly_pt ); m_CornersList.Append( poly_pt );
} }
// move corner of polyline // move corner of polyline
// //
void CPolyLine::MoveCorner( int ic, int x, int y ) void CPolyLine::MoveCorner( int ic, int x, int y )
@ -248,15 +253,12 @@ void CPolyLine::DeleteCorner( int ic )
} }
/******************************************/
void CPolyLine::RemoveContour( int icont )
/******************************************/
/** /**
* Function RemoveContour * Function RemoveContour
* @param icont = contour number to remove * @param icont = contour number to remove
* remove a contour only if there is more than 1 contour * remove a contour only if there is more than 1 contour
*/ */
void CPolyLine::RemoveContour( int icont )
{ {
UnHatch(); UnHatch();
int istart = GetContourStart( icont ); int istart = GetContourStart( icont );
@ -509,15 +511,12 @@ CPolyLine* CPolyLine::Fillet( unsigned int aRadius, unsigned int aSegments )
} }
/******************************************/
void CPolyLine::RemoveAllContours( void )
/******************************************/
/** /**
* function RemoveAllContours * function RemoveAllContours
* removes all corners from the list. * removes all corners from the list.
* Others params are not changed * Others params are not changed
*/ */
void CPolyLine::RemoveAllContours()
{ {
m_CornersList.RemoveAllContours(); m_CornersList.RemoveAllContours();
} }
@ -980,6 +979,7 @@ void CPolyLine::MoveOrigin( int x_off, int y_off )
Hatch(); Hatch();
} }
/* /*
* AppendArc: * AppendArc:
* adds segments to current contour to approximate the given arc * adds segments to current contour to approximate the given arc
@ -1149,7 +1149,8 @@ int CPolyLine::Distance( const wxPoint& aPoint )
} }
/* test is the point aPos is near (< aDistMax ) a vertex /*
* test is the point aPos is near (< aDistMax ) a vertex
* return int = the index of the first corner of the vertex, or -1 if not found. * return int = the index of the first corner of the vertex, or -1 if not found.
*/ */
int CPolyLine::HitTestForEdge( const wxPoint& aPos, int aDistMax ) const int CPolyLine::HitTestForEdge( const wxPoint& aPos, int aDistMax ) const
@ -1191,7 +1192,9 @@ int CPolyLine::HitTestForEdge( const wxPoint& aPos, int aDistMax ) const
return corner; return corner;
} }
/* test is the point aPos is near (< aDistMax ) a corner
/*
* test is the point aPos is near (< aDistMax ) a corner
* return int = the index of corner of the, or -1 if not found. * return int = the index of corner of the, or -1 if not found.
*/ */
int CPolyLine::HitTestForCorner( const wxPoint& aPos, int aDistMax ) const int CPolyLine::HitTestForCorner( const wxPoint& aPos, int aDistMax ) const
@ -1313,6 +1316,7 @@ bool CPolyLine::IsPolygonSelfIntersecting()
return false; return false;
} }
const SHAPE_POLY_SET ConvertPolyListToPolySet( const CPOLYGONS_LIST& aList ) const SHAPE_POLY_SET ConvertPolyListToPolySet( const CPOLYGONS_LIST& aList )
{ {
SHAPE_POLY_SET rv; SHAPE_POLY_SET rv;

View File

@ -51,6 +51,8 @@ bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList,
int aIdxend, int aIdxend,
int aRefx, int aRefx,
int aRefy); int aRefy);
#endif
/** /**
* Function TestPointInsidePolygon (overlaid) * Function TestPointInsidePolygon (overlaid)
* same as previous, but mainly use wxPoint * same as previous, but mainly use wxPoint
@ -59,7 +61,6 @@ bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList,
* @param aRefPoint: the point coordinate to test * @param aRefPoint: the point coordinate to test
* @return true if the point is inside, false for outside * @return true if the point is inside, false for outside
*/ */
#endif
bool TestPointInsidePolygon( const wxPoint* aPolysList, bool TestPointInsidePolygon( const wxPoint* aPolysList,
int aCount, int aCount,
const wxPoint &aRefPoint ); const wxPoint &aRefPoint );