Code formatting
This commit is contained in:
parent
a7cd62ad12
commit
1751e4631c
|
@ -797,13 +797,13 @@ void OPENGL_GAL::DrawPolygon( const VECTOR2D aPointList[], int aListSize )
|
|||
drawPolygon( points.get(), aListSize );
|
||||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::drawTriangulatedPolyset( const SHAPE_POLY_SET& aPolySet )
|
||||
{
|
||||
currentManager->Shader( SHADER_NONE );
|
||||
currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a );
|
||||
|
||||
|
||||
if ( isFillEnabled )
|
||||
if( isFillEnabled )
|
||||
{
|
||||
for( int j = 0; j < aPolySet.OutlineCount(); ++j )
|
||||
{
|
||||
|
|
|
@ -1863,8 +1863,6 @@ SHAPE_POLY_SET &SHAPE_POLY_SET::operator=( const SHAPE_POLY_SET& aOther )
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class SHAPE_POLY_SET::TRIANGULATION_CONTEXT
|
||||
{
|
||||
public:
|
||||
|
@ -1887,10 +1885,8 @@ public:
|
|||
if ( aIsHole )
|
||||
m_cdt->AddHole( m_points );
|
||||
else
|
||||
{
|
||||
m_cdt.reset( new p2t::CDT( m_points ) );
|
||||
}
|
||||
}
|
||||
|
||||
void Triangulate()
|
||||
{
|
||||
|
@ -2014,6 +2010,7 @@ void SHAPE_POLY_SET::triangulateSingle( const POLYGON& aPoly,
|
|||
|
||||
aResult.AllocateVertices( totalVertexCount( aPoly ) );
|
||||
ctx.AddOutline( aPoly[0], false );
|
||||
|
||||
for( unsigned i = 1; i < aPoly.size(); i++ )
|
||||
{
|
||||
ctx.AddOutline( aPoly[i], true ); // add holes
|
||||
|
|
|
@ -609,7 +609,6 @@ class SHAPE_POLY_SET : public SHAPE
|
|||
return m_triangulatedPolys[aIndex].get();
|
||||
}
|
||||
|
||||
|
||||
const SHAPE_LINE_CHAIN& COutline( int aIndex ) const
|
||||
{
|
||||
return m_polys[aIndex][0];
|
||||
|
|
|
@ -944,10 +944,10 @@ void ZONE_CONTAINER::Rotate( const wxPoint& centre, double angle )
|
|||
|
||||
for( unsigned ic = 0; ic < m_FillSegmList.size(); ic++ )
|
||||
{
|
||||
wxPoint a ( m_FillSegmList[ic].A );
|
||||
wxPoint a( m_FillSegmList[ic].A );
|
||||
RotatePoint( &a, centre, angle );
|
||||
m_FillSegmList[ic].A = a;
|
||||
wxPoint b ( m_FillSegmList[ic].B );
|
||||
wxPoint b( m_FillSegmList[ic].B );
|
||||
RotatePoint( &b, centre, angle );
|
||||
m_FillSegmList[ic].B = a;
|
||||
}
|
||||
|
@ -1303,6 +1303,7 @@ BITMAP_DEF ZONE_CONTAINER::GetMenuImage() const
|
|||
return add_zone_xpm;
|
||||
}
|
||||
|
||||
|
||||
void ZONE_CONTAINER::SwapData( BOARD_ITEM* aImage )
|
||||
{
|
||||
assert( aImage->Type() == PCB_ZONE_AREA_T );
|
||||
|
@ -1310,11 +1311,13 @@ void ZONE_CONTAINER::SwapData( BOARD_ITEM* aImage )
|
|||
std::swap( *((ZONE_CONTAINER*) this), *((ZONE_CONTAINER*) aImage) );
|
||||
}
|
||||
|
||||
|
||||
void ZONE_CONTAINER::CacheTriangulation()
|
||||
{
|
||||
m_FilledPolysList.CacheTriangulation();
|
||||
}
|
||||
|
||||
|
||||
bool ZONE_CONTAINER::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly ) const
|
||||
{
|
||||
if( GetNumCorners() <= 2 ) // malformed zone. polygon calculations do not like it ...
|
||||
|
|
Loading…
Reference in New Issue