Fix some formatting issues.
This commit is contained in:
parent
ed28b7e29b
commit
c437ca1640
|
@ -70,11 +70,13 @@ 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.
|
||||||
*/
|
*/
|
||||||
int CPolyLine::RemoveNullSegments()
|
int CPolyLine::RemoveNullSegments()
|
||||||
{
|
{
|
||||||
int removed = 0;
|
int removed = 0;
|
||||||
unsigned startcountour = 0;
|
unsigned startcountour = 0;
|
||||||
|
@ -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;
|
||||||
|
|
|
@ -47,10 +47,12 @@ class CPOLYGONS_LIST;
|
||||||
* @return true if the point is inside, false for outside
|
* @return true if the point is inside, false for outside
|
||||||
*/
|
*/
|
||||||
bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList,
|
bool TestPointInsidePolygon( const CPOLYGONS_LIST& aPolysList,
|
||||||
int aIdxstart,
|
int aIdxstart,
|
||||||
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 );
|
||||||
|
|
Loading…
Reference in New Issue