Fixed oval pads highlighting in mark collisions mode (PNS).
This commit is contained in:
parent
7a51a502b4
commit
65ebfe12c1
|
@ -224,7 +224,6 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
|
||||
case PAD_OVAL:
|
||||
if( sz.x == sz.y )
|
||||
solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) );
|
||||
|
@ -251,8 +250,8 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
{
|
||||
wxPoint coords[4];
|
||||
aPad->BuildPadPolygon( coords, wxSize( 0, 0 ), aPad->GetOrientation() );
|
||||
|
||||
SHAPE_CONVEX* shape = new SHAPE_CONVEX();
|
||||
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
{
|
||||
shape->Append( wx_c + coords[ii] );
|
||||
|
@ -291,6 +290,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
corner = wxPoint( start.x, -( w / 2 ) );
|
||||
else
|
||||
corner = wxPoint( w / 2, start.y );
|
||||
|
||||
RotatePoint( &start, aPad->GetOrientation() );
|
||||
RotatePoint( &corner, aPad->GetOrientation() );
|
||||
shape->Append( wx_c + corner );
|
||||
|
@ -306,6 +306,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
corner = wxPoint( end.x, w / 2 );
|
||||
else
|
||||
corner = wxPoint( -( w / 2 ), end.y );
|
||||
|
||||
RotatePoint( &end, aPad->GetOrientation() );
|
||||
RotatePoint( &corner, aPad->GetOrientation() );
|
||||
shape->Append( wx_c + corner );
|
||||
|
|
|
@ -166,15 +166,15 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const
|
|||
|
||||
if( m_type == PR_SHAPE )
|
||||
{
|
||||
if( !m_shape )
|
||||
return;
|
||||
|
||||
aGal->SetLineWidth( m_width );
|
||||
aGal->SetStrokeColor( m_color );
|
||||
aGal->SetFillColor( m_color );
|
||||
aGal->SetIsStroke( m_width ? true : false );
|
||||
aGal->SetIsFill( true );
|
||||
|
||||
if( !m_shape )
|
||||
return;
|
||||
|
||||
switch( m_shape->Type() )
|
||||
{
|
||||
case SH_LINE_CHAIN:
|
||||
|
@ -187,14 +187,14 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const
|
|||
case SH_SEGMENT:
|
||||
{
|
||||
const SHAPE_SEGMENT* s = (const SHAPE_SEGMENT*) m_shape;
|
||||
aGal->DrawLine( s->GetSeg().A, s->GetSeg().B );
|
||||
aGal->DrawSegment( s->GetSeg().A, s->GetSeg().B, s->GetWidth() );
|
||||
|
||||
if( m_clearance > 0 )
|
||||
{
|
||||
aGal->SetLayerDepth( ClearanceOverlayDepth );
|
||||
aGal->SetStrokeColor( COLOR4D( DARKDARKGRAY ) );
|
||||
aGal->SetLineWidth( m_width + 2 * m_clearance );
|
||||
aGal->DrawLine( s->GetSeg().A, s->GetSeg().B );
|
||||
aGal->SetFillColor( COLOR4D( DARKDARKGRAY ) );
|
||||
aGal->DrawSegment( s->GetSeg().A, s->GetSeg().B, s->GetWidth() + 2 * m_clearance );
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue